1

Is it necessary to learn JavaScript before jQuery?

2

6 Answers 6

9

jQuery is a JavaScript library. To be able to use it, you need to know JavaScript.

It is possible to pick up JS as you learn jQuery, but this is a terrible approach that will leave you confused about what is JavaScript and what is jQuery.

Sign up to request clarification or add additional context in comments.

3 Comments

And to start using a library without proper knowledge of javascript will lead to a whole lot of copying and pasting of example code, and as a result, very dirty ugly (and perhaps even smelly) code.
+1. The number of questions I see on here with ridiculous long selector constructs and unreliable string-bodging to do something there's a one-liner native DOM property for makes me sad.
@bobince: Couldn't agree more.
2

Yes. Unless you understand Javascript's approach to objects, passing functions, the "this" identifier, and other language specific constructs, you won't be able to understand the prototypes for jQuery functions.

I'm teaching myself both at the same time, but it would certainly help to know Javascript basics (at least) before starting with jQuery.

Comments

1

It's a good idea to know the basics of JavaScript, but you don't need in depth knowledge of it to use JQuery. It's like programming with any other framework. It will do a lot for you, and you can fumble through it with only knowing a little bit of the underlying language, but sooner or later, you'll probably run into a situation where having a good grasp of JavaScript will be helpful.

Comments

1

It would definitely help, but would also probably be fairly painful.

If I were you, I would crack on with jquery...

Make liberal use of visualjquery.com, and you've always got stackoverflow to fall back on...

Good luck fella

Comments

1

Given that jQuery is a library of JavaScript code, meant to ease development of JavaScript applications that interact with web browsers/content, I'd say yes. Now, you could learn both at the same time, like many people have learned Ruby in order to learn Rails. But they're kind of inseparable.

Comments

1

It can be useful if you need to debug something, also: Firebug

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.