user1722791 user1722791 - 6 months ago 20
Javascript Question

JQuery, selecting what does NOT contains something

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"?

Answer

Use the :not() selector that is part of the jquery framework. Something like $('tr:not(:contains("pc"))') should do the trick.

Comments