Brought in a fix from Sizzle - IE doesn't have .contains on XML elements.
[jquery.git] / src / selector.js
index b3d8dbc..8ade53b 100644 (file)
@@ -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