From: John Resig Date: Sat, 15 Sep 2007 03:05:00 +0000 (+0000) Subject: Added a fix for bug #1612, where :contains() was failing on XML documents, in IE. X-Git-Tag: 1.2.1~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1088d06e5485451549990e6143001488f1580d83;p=jquery.git Added a fix for bug #1612, where :contains() was failing on XML documents, in IE. --- diff --git a/src/selector.js b/src/selector.js index f746fe11c..82627e1cc 100644 --- a/src/selector.js +++ b/src/selector.js @@ -31,7 +31,7 @@ jQuery.extend({ empty: "!a.firstChild", // Text Check - contains: "(a.textContent||a.innerText||'').indexOf(m[3])>=0", + contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0", // Visibility visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',