Re:You might not need jQuery
by jonknee on Thursday January 30, 2014 @03:20PM
(#7153103)
And requires IE 9+ which rules it out for a lot of people...
[ Parent
| on HN ]
Actually, no. IE8 supports it.
Re:You might not need jQuery
by mattmanser on Thursday January 30, 2014 @03:54PM
(#7153297)
IE8 is limited to the old CSS selectors so basically it sucks and doesn't really support it.
In practice, especially for javascript usage, the old CSS selectors cover all the bases.
The new-stuff, while great for styling, isn't all that relevant for scripting. nth-child, say, is often (though not always) simply an indexing operation on the return value of querySelectorAll; and in general you don't even want that since usually you have a specific element in mind and have labelled that element with a class to find it.
I don't support IE8 anymore, and use CSS3 liberally in the actual css, yet I can't think of more than a handful of cases I used the selectors from javascript, certainly none of them critical. Do you actually use this?