Bug Tracker

Ticket #2771: index.diff

File index.diff, 441 bytes (added by flesler, 8 months ago)

Passes all the tests, on all browsers.

  • core.js

     
    146146 
    147147        // Locate the position of the desired element 
    148148        this.each(function(i){ 
    149             if ( this == elem ) 
     149            // use === because on IE, window == document 
     150            if( elem.jquery ? elem.index(this) != -1 : this === elem ){ 
    150151                ret = i; 
     152                return false; 
     153            } 
    151154        }); 
    152155 
    153156        return ret;