:not code doesn't seem to work.
I'm currently studying off the book 'Learning jQuery : Better Interaction Design and Web Development'.
In the book is this code:
-
$('tr:not([th]):even').addClass('even');
Which they say will select all tr tags that don't have child th tags. Well that's what they say, but I'm finding that the class name 'even' is still being added to tr tags that have a child of th.
It's not a particularly big deal, except that I'm trying to understand the fundamentals of jquery, and so now I'm not sure how you would go about doing this with a method that actually works! Can anyone point out to me how you would select all tr tags that don't have a th child element? Thank you.[/code]