jquery包含'not'的语法?

nat*_*web 2 jquery contains

如果李说"事情",我想追加,但如果它说"事情",我想追加.这有可能:contains吗?

$("ul li:nth-child(2):contains('Thing')").append("foo");
Run Code Online (Sandbox Code Playgroud)

Den*_*ret 7

有一个不起作用:

$("ul li:nth-child(2):contains('Thing')").not(':contains("Things")').append("foo");
Run Code Online (Sandbox Code Playgroud)