我已經得到了這個,但它似乎沒有做任何事情,但我無法弄清楚爲什麼......語法似乎很好。jQuery:包含在.not()不起作用
$('#entries li').not(function() {
return $('span.date:contains("March 2016")', this);
}).hide();
在其他功能使用:
$('#entries li').not(function() {
return $('.date', this).text() === formattedDate;
}).hide();
這一個工作正常。
任何幫助將不勝感激。
只需使用有效的解決方案,然後'._。' – Phiter
什麼是你的HTML是什麼樣子? – j08691
那麼你有一個符合這個要求的元素:'span.date:contains("March 2016「)'在你的HTML? – stackErr