If i want to select what contains "pc" i use $('tr:contains("pc")')
But what can i use to select what does NOT contains "pc"?
If i want to select what contains "pc" i use $('tr:contains("pc")')
But what can i use to select what does NOT contains "pc"?
Use the :not() selector that is part of the jquery framework. Something like $('tr:not(:contains("pc"))')
should do the trick.
:not
is actually standard css. It's :contains
that's jquery specific. –
Peipus $("tr:not(:contains("pc"))")
if you use simple quotes with double quotes mixed in the same sentence, it doesn't work
© 2022 - 2024 — McMap. All rights reserved.