Simplified the bitmask in Element#descendantOf.

This commit is contained in:
Andrew Dupont 2007-11-01 19:06:02 +00:00
parent 7cf17c7bec
commit e457edbcf4

View File

@ -360,7 +360,7 @@ Element.Methods = {
element = $(element), ancestor = $(ancestor);
if (element.compareDocumentPosition)
return (element.compareDocumentPosition(ancestor) & 24) === 8;
return (element.compareDocumentPosition(ancestor) & 8) === 8;
if (element.sourceIndex) {
var e = element.sourceIndex, a = ancestor.sourceIndex,