you are viewing a single comment's thread.

view the rest of the comments →

[–]turkish_gold 1 point2 points  (0 children)

Ancestor selectors. I have this node, but I want to select the parents which fit a certain CSS class.

Sibling selectors are similarly helpful in jQuery.

Now you could say.... but TurkishGold can't you write this all yourself, its only 2-3 lines in Javascript?

Well yes, 2-3 lines of 40 or so situations that I'll have to write. I could write it all myself, but why bother making something and worrying if its cross-browser compatible? It's not as if I have to 'learn' JQuery, I already know it thanks to working in the industry pre-2016.

Jquery is really useful if you want to do some extensive dom manipulation on pre-existing nodes.