Permalink
Browse files

Fallback to using sourceIndex, in IE, if it's available on both nodes…

…. Fixes #7341.
  • Loading branch information...
1 parent e300eeb commit 2f96e523f77c69fa99138e49d923c44c9bdfae51 @jeresig jeresig committed May 10, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 sizzle.js
View
@@ -933,6 +933,10 @@ if ( document.documentElement.compareDocumentPosition ) {
hasDuplicate = true;
return 0;
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+
// If the nodes are siblings (or identical) we can do a quick check
} else if ( aup === bup ) {
return siblingCheck( a, b );

0 comments on commit 2f96e52

Please sign in to comment.