我有下一个 li-s:
your ad was Approved
your name was Approved
your ad was Deleted
我想通过这两个条件找到:
我尝试了下一件事:
$("#notification-list").find(
"li:contains('was Approved'), li:not(:contains('your ad'))).each(function () {
}
但我得到了:
your ad was Approved (I got it cause 'your ad' is found here and 'was Approved')
your name was Approved (I got it cause 'was Approved' is found)
your ad was Deleted (I got it cause 'your ad' is found)
我只想获取包含这两种东西的项目:
your ad was Approved (I got it cause 'your ad' is found here and 'was Approved')
我试过:
$("#notification-list").find(
"li:contains('was Approved') and li:not(:contains('your ad'))).each(function () {
}
但它不起作用。
任何帮助表示赞赏!