I have mastered for the most part taking my designs and coding them as read only web pages. I'm looking to go the next level. I have used some jquery plugin's and figured them out quite easily with a bit of trial and error. I have also started reading a book on Java script but it seems like nothing I'll ever really need as I don't plan on REALLY ever writing my own code. I don't think I will at least any time soon. Is it safe for me to just learn a plethora of jquery plugin uses for now or should i really be trying to learn java script to write my own code. I bought the book "Headfirst Javascript" but it is a lot of basics where jquery plugins give me results fast i can use! Any advice?
views:
109answers:
3jQuery is like any abstraction: you can use it without understanding what it's doing under the hood but don't be surprised if you run into problems from that lack of understanding. Also, you can't do just jQuery without doing any Javascript whatsoever. For example:
- Redirecting the user;
- Reloading the page;
- The contextual meaning of 'this'.
These are all important and common things in the jQuery world but are "pure" Javascript.
So all in all I'd recommend having at least a rudimentary knowledge of the DOM and Javascript syntax and functionality before doing jQuery.
I started with jquery and then bought some books on classic javascript (like the one of john resig, the jquery programmer !)
I thought javascript was hard to learn and with jquery you'll learn what can be done with javascript ! Then with books you'll understand the internals of jquery. good luck
Also if you have to choose between prototype and jquery, choose jquery, i used prototype for 4 months and didn't learned any javascript specific function.
Then with only 1 week of javascript, i knew what setTimeout was used for
Just an example to show that jquery will help you learn javascript from time to time
Learn JavaScript. Learn the DOM.
jQuery is nice, but if you don't know JavaScript and the DOM, it isn't going to help.
$(function() { /* JavaScript goes here */ });
jQuery does three things well: it enables developers to use CSS selectors to manipulate the DOM, it smooths the rough edges of cross-browser programming, and it offers a plethora of wonderful plugins.
I recommend Douglas Crockford's "JavaScript: The Good Parts." It's full of good advice on how to write good JavaScript, and it has an insightful road map for avoiding the gotchas and pitfalls of bad JavaScript. Perhaps most importantly, it's short enough that you can read and digest in a few days (or hours if you're a fast reader).