From: John Resig Date: Mon, 5 Jan 2009 21:59:07 +0000 (+0000) Subject: Brought in a fix from Sizzle - IE doesn't have .contains on XML elements. X-Git-Tag: 1.3b2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=089da4ea777ed5c30dfc835b70b953c86943d62e;p=jquery.git Brought in a fix from Sizzle - IE doesn't have .contains on XML elements. --- diff --git a/src/selector.js b/src/selector.js index b3d8dbc9a..8ade53bdd 100644 --- a/src/selector.js +++ b/src/selector.js @@ -778,7 +778,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck ) { var contains = document.compareDocumentPosition ? function(a, b){ return a.compareDocumentPosition(b) & 16; } : function(a, b){ - return a !== b && a.contains(b); + return a !== b && a.contains ? a.contains(b) : true; }; // EXPOSE