3 ms·
You're right, the dogmatic opposition to jQuery tends to be unconvincing. The reason I don't use jQuery these days is because other libraries serve jQuery's fu
by verisimilidude 8y ago
You're right, the dogmatic opposition to jQuery tends to be unconvincing.
The reason I don't use jQuery these days is because other libraries serve jQuery's functions a little better for me.
* If I want a more robust interface for my XHR requests, there are a ton of nice libraries out there. Superagent is a good example.
* If I need utility belt stuff, I can get more out of Lodash, Ramda, etc.
* If I want animations, there are much better ways to do that nowadays, even with just basic CSS3.
* If I need distinct DOM lookup and manipulation...well, this might not be needed at all if I'm doing an SPA (in React, etc.). That said, there are compelling alternatives that I like, such as bonzo.
And then there's just the fact that you can now do an awful lot with bare Javascript.
So my argument against jQuery is less "jQuery sucks" and more "I prefer using all these other tools that cover the same surface". jQuery is still a marvel for all the conveniences it provides, and I don't think anyone should stop using it just because the cool kid says so.
- ravenstine 8y agoThat pretty much sums it up. jQuery animation can be pretty atrocious. Granted, CSS transitions/animations can also be atrocious if certain properties are being changed at the wrong times. jQuery is going to select and manipulate elements, but it's not going to compensate for when the developer does moronic things like creating DOM elements a bajillion times with HTML strings in jQuery every time something changes, animating things in improper ways(like animating dimensional properties that cause extra redrawing before postrender), etc. There's nothing wrong with using jQuery. I just find that I don't even need it and would much prefer to just use existing APIs in its place. If there's a compatibility issue, I can install a polyfill that's much smaller than jQuery ever will be.