3 ms·
jQuery is more or less a wrapper for the DOM API. Considering the amount of man-hours(1 guy over three weeks) that went into designing the DOM, it's safe to ass
by rtpg 14y ago
jQuery is more or less a wrapper for the DOM API. Considering the amount of man-hours(1 guy over three weeks) that went into designing the DOM, it's safe to assume that jQuery does the interfacing better.
I don't understand why people want to make a distinction between vanilla JS and jQuery. It's like saying you want to make a distinction between standard C++ and QT. One is a language, the other is an interface. jQuery doesn't exactly provide a standard library by any stretch of the imagination.
- CWIZO 14y agoThe problem is that many many "developers" think that jQuery is a language. Just browse stack overflow and you'll see. This "developers" couldn't get a element from the DOM with JavaScript if you threw document.getElementById in their face. So that's the point that OP is making. First learn JavaScript, then move to abstractions such as jQuery. That way you won't ask silly questions such as "how to write a if statement in jQuery".
- benhowdle89 14y agoThis. Everything this. Find the pain points with JavaScript, then make your life easier with jQuery.
- PommeDeTerre 14y agoJust about everything is a pain point when using JavaScript or when dealing with the DOM. So it's understandable, although maybe not a good idea, why so many people don't separate JavaScript and libraries like jQuery, MooToo, or YUI. Such a combination is essentially needed merely to bring JavaScript up to a minimal level of usability. We generally don't find this to be the case with other, more sensible languages, which is why it seems so odd. C, C++, Java, C# and Python implementations come with a sensible language and a rich standard library. Developers using them don't need to bring their own standard library just to get a basic level of functionality.
- UweSchmidt 14y agoI'd say: start with learning jQuery and check out the equivalent Javascript code for reference and amusement.
- masklinn 14y ago> jQuery is more or less a wrapper for the DOM API. Note that jQuery is a pretty big (and complex) wrapper. Zepto provides a much smaller wrapper with a very similar (though not fully identical) interface. It used to be mobile-webkit-only but has since moved to "modern browsers".