Side navigation
Ticket #2771: index.diff
File index.diff, 0.4 KB (added by flesler, May 06, 2008 07:14PM UTC)
Passes all the tests, on all browsers.
Index: core.js
===================================================================
--- core.js (revision 5470)
+++ core.js (working copy)
@@ -146,8 +146,11 @@
// Locate the position of the desired element
this.each(function(i){
- if ( this == elem )
+ // use === because on IE, window == document
+ if( elem.jquery ? elem.index(this) != -1 : this === elem ){
ret = i;
+ return false;
+ }
});
return ret;
Download in other formats:
Original Format
File index.diff, 0.4 KB (added by flesler, May 06, 2008 07:14PM UTC)
Passes all the tests, on all browsers.
Index: core.js
===================================================================
--- core.js (revision 5470)
+++ core.js (working copy)
@@ -146,8 +146,11 @@
// Locate the position of the desired element
this.each(function(i){
- if ( this == elem )
+ // use === because on IE, window == document
+ if( elem.jquery ? elem.index(this) != -1 : this === elem ){
ret = i;
+ return false;
+ }
});
return ret;