I want to select elements, but not if one of their ancestors matches a particular selector.
For example, suppose I want to map all <a> nodes that are not children of a table.
I tried something like this:
$("a", ":not(table *)");
but this causes my browser to crash.
This one also hangs in my browser:
jQuery("a", ":not(table td)");
The requested page is quite large, with a lot of very large tables. So, I need something that works well. Any ideas?
jquery css-selectors
Aaron
source share