Skip to content
Permalink
Browse files

Core: Changed $.ui.contains to use the same logic as jQuery's interna…

…l contains function.
  • Loading branch information...
scottgonzalez committed Jan 3, 2009
1 parent ed1b6de commit ab5bc7916830dfb3327ccf74e3b03d0802b221e2
Showing with 3 additions and 9 deletions.
  1. +3 −9 ui/ui.core.js
@@ -38,15 +38,9 @@ $.ui = {
},

contains: function(a, b) {
var safari2 = $.browser.safari && $.browser.version < 522;
if (a.contains && !safari2) {
return a.contains(b);
}
if (a.compareDocumentPosition)
return !!(a.compareDocumentPosition(b) & 16);
while (b = b.parentNode)
if (b == a) return true;
return false;
return document.compareDocumentPosition
? a.compareDocumentPosition(b) & 16
: a !== b && a.contains(b);
},

cssCache: {},

0 comments on commit ab5bc79

Please sign in to comment.
You can’t perform that action at this time.