JQuery, selecting what does NOT contains something

37,384

Solution 1

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

Solution 2

$('tr').not(':contains("pc")')

Solution 3

$('tr:not(:contains("pc"))') // this can be used
Share:
37,384
user1722791
Author by

user1722791

Doing things wrong trying to make them right.

Updated on May 11, 2020

Comments

  • user1722791
    user1722791 almost 4 years

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