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.
You might not need jQuery
11–20 of 360 posts
Re: You might not need jQuery
#12Chaining and implicit iterators.
Re: You might not need jQuery
#13I 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
#14I 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…
However, your Sizzle example is covered by document.querySelectorAll: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...
Re: You might not need jQuery
#15I could be convinced of the latter but not the former.
Re: You might not need jQuery
#16There are many things you don't need to do. I'll take the time saved in development over cutting out an extra framework.
> jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.
Re: You might not need jQuery
#17I've already got fall-back for people who've turned off JS, but I've yet to write anything for unsupported JS.
Re: You might not need jQuery
#18> $('').append($(el).clone()).html()
vs
> el.outerHTML
Why not $(el)[0].outerHTML?
Re: You might not need jQuery
#19I 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…
Since a library is written once and used in many different places, it's worth going to a little more effort to make it more flexible.
Re: You might not need jQuery
#20> 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.