views:

212

answers:

8

I'm wondering what are some common misconceptions of jQuery? I've found there is a lot of hype around the technology and I'm trying to wonder how much of it is true. And how does it compare to the other Javascript libraries like mootools etc.

+10  A: 

It's all true. I've not found a problem that jQuery (or one of its plugins) couldn't solve.

Admittedly, some would say that including the jQuery library + plugins is an unecessary network traffic cost, but if you compare the jQuery library to an image, for example, the cost seems minimal. Furthermore, with gzip + JS compression, the actual data sent shrinks greatly.

Stefan Kendall
+1 for agreement
thephpdeveloper
It's true that you can solve anything with jQuery, but that's simply because you can package any Javascript code as a jQuery plugin, so anything that can be solved with Javascript can be made to look like jQuery solution. So, even if you can solve anything using jQuery, that doesn't mean that you always should.
Guffa
9 upvotes? There's no answer to the question here.
Graeme Perrow
the answer is that there are no *common* misconceptions
Nicky De Maeyer
@Nicky: Then I strongly disagree. A lot of people use some jQuery code that they paste together without knowing what jQuery really is or why the code is working. There is definitely a lot of misconceptions, and some of them are common.
Guffa
+1  A: 

You don't need to know 'raw' JavaScript to write good jQuery.

while you can make some cool stuff not really knowing a lot of basic JavaScript, a lot of jQuery constructs are significantly slower than their basic, non-framework counterparts.

GSto
+1  A: 

jQuery is the best thing that ever hapened to javascript, at least for me.
it makes everything so easy to do, without you having to worry about browser compatibility.

The community is very large and you can find plugins for nearly everything on the web...

combined with ajax request, jQuery can do virtually anything you want and application to do, and brings that to the web...

Nicky De Maeyer
Sorry, but where's the common misconception about jQuery in this answer?
Graeme Perrow
there isn't any...
Nicky De Maeyer
+6  A: 

That jQuery is appropriate for every possible situation where JavaScript may/should be employed.

inkedmn
+4  A: 

A common misconception seems to be that people think that jQuery is a separate language from Javascript, and not just another Javascript library.

There are often questions about how you solve something in jQuery, without considering if jQuery is the best solution, or even if it's useful at all for that specific problem. For example, sometimes the cascading properties of CSS is much more efficient and scalable than the jQuery solution to loop through the elements.

Guffa
...but the CSS solution almost certainly won't work in IE6, for some obscure, unpredictable reason.
Stefan Kendall
@Stefan: ...but then it won't work setting the style using jQuery either.
Guffa
You wouldn't set the style! You'd use a jQuery solution that avoids any complicated CSS whatsoever!
Stefan Kendall
+1  A: 

jQuery is to JavaScript what sliced bread is to sandwiches.

You CAN do it all manually - but why not use a highly tested library that is most likley better than anything you could write and test yourself.

Mark Schultheiss
+3  A: 

Judging by the comments so far, I would conject that the most common misconception about jQuery is that it is perfect.

Alex Barrett
I'm toying with the idea of deleting this comment already, but please be aware that it is intended to be a little tongue-in-cheek :p
Alex Barrett
+1  A: 

If you are targeting modern desktop browsers only, jQuery is the tits. The only issues I have run into is on some mobile browsers where they might get some parts of jquery but not others which can have some "interesting" effects on your apps.

Wyatt Barnett