You might not need jQuery
21–30 of 360 posts
Re: You might not need jQuery
#22I understand the desire for people to make pages like this (this isn't the first), but the examples are not completely honest with themselves, in my opinion. One of the biggest benefits jQuery introduces is the concept of treating single selections and multiple selections identically. While using jQuery, I can emit a $(".class").hide() call, which will apply to all elements with the matching class. Simple and elegant…
Re: You might not need jQuery
#23Re: You might not need jQuery
#24It's hard to tell if this site is advocating for ditching this type of js library altogether and writing all those replacements inline (ick for some of those) or simply replacing jQuery with a thinner (and narrower) library. I could be convinced of the latter but not the former.
Re: You might not need jQuery
#25> in truth, post-IE8, browsers are pretty easy to deal with on their own I totally agree, but not everyone lives in a post-IE8 world. It's as much as 10% of our traffic on some sites and several big clients use it.
That's why it's called You_Might_NotNeedJQuery. ;)
Re: You might not need jQuery
#26Use jQuery please.
Rewriting jQuery methods with vanilla js usually turns out to be a hack job that is buggy and ugly. Just use jQuery.
Re: You might not need jQuery
#27It's hard to tell if this site is advocating for ditching this type of js library altogether and writing all those replacements inline (ick for some of those) or simply replacing jQuery with a thinner (and narrower) library. I could be convinced of the latter but not the former.
For Offline, PACE, Odometer, Tether, and many of our other OS projects (http://github.hubspot.com), we chose not to depend on jQuery because it means our libraries can be smaller and more people can use them.
We're happy and proud to use jQuery when building an application. As many other commenters have noticed, it can be extremely useful at reducing code complexity—and let's just say it: it can make it more enjoyable to write front-end code!
Re: You might not need jQuery
#28You had me convinced until I scrolled down to read the code examples and realized why I actually do need jQuery. If its between adding yet another collection of utility functions to approximate the functionality jQuery would give me vs just adding jQuery. I'd rather go with jQuery.
Re: You might not need jQuery
#29What's a good resource to read up on how browsers handle unsupported JS, if I want to write a fall-back? I've already got fall-back for people who've turned off JS, but I've yet to write anything for unsupported JS.
Sometimes it's just as simple as testing if the function your about to call exists before you call it.
Re: You might not need jQuery
#30http://code.jquery.com/jquery-1.11.0.js
Notice the rbuggyQSA variable.
Also check out Quirksmode: