Skip to content
Permalink
Browse files

Made a slight adjustment to $("expr") to make it faster.

  • Loading branch information
jeresig committed Jan 14, 2007
1 parent 34355cd commit 18f28ea7d46d5adce24565f277529c798ebf1763
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/jquery/jquery.js
@@ -38,14 +38,14 @@ var jQuery = function(a,c) {

// Handle HTML strings
if ( typeof a == "string" ) {
// HANDLE: $(html) -> $(array)
var m = /^[^<]*(<.+>)[^>]*$/.exec(a);
if ( m )
a = jQuery.clean( [ m[1] ] );

a = m ?
// HANDLE: $(html) -> $(array)
jQuery.clean( [ m[1] ] ) :

// HANDLE: $(expr)
else
return new jQuery( c ).find( a );
// HANDLE: $(expr)
jQuery.find( a, c );
}

return this.setArray(

0 comments on commit 18f28ea

Please sign in to comment.
You can’t perform that action at this time.