Bug Tracker

Ticket #3784: grep[6053].diff

File grep[6053].diff, 701 bytes (added by flesler, 14 years ago)
  • src/core.js

     
    10831083        },
    10841084
    10851085        grep: function( elems, callback, inv ) {
     1086                if( filter && !inv )
     1087                        return filter.call( elems, callback );
     1088               
    10861089                var ret = [];
    10871090
    10881091                // Go through the array, only saving the items
     
    11141117// It's included for backwards compatibility and plugins,
    11151118// although they should work to migrate away.
    11161119
    1117 var userAgent = navigator.userAgent.toLowerCase();
     1120var userAgent = navigator.userAgent.toLowerCase(),
     1121        filter = Array.prototype.filter;
    11181122
    11191123// Figure out what browser is being used
    11201124jQuery.browser = {