jQuery: The Write Less, Do More JavaScript Library

Ticket #2104: find-with-object-support.diff

File find-with-object-support.diff, 0.5 kB (added by torben, 8 months ago)

patch enabling fallback to standard jQ query if an object different from string is passed

  • D:/Data/SKL-workspace/jquery/src/core.js

     
    281281    }, 
    282282 
    283283    find: function( selector ) { 
     284        // Quickly handle non-string expressions 
     285        if ( typeof selector != "string" ) 
     286            return jQuery(selector); 
     287         
    284288        var elems = jQuery.map(this, function(elem){ 
    285289            return jQuery.find( selector, elem ); 
    286290        });