X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=ca4051f3d9cb23db233f6d95485c5d6beae58cf8;hb=53e12752e00c2a86757ec15a0c871dee8ccd1bea;hp=4cc2a68fe5baf90d4bb4b79d3b93364e12142ca3;hpb=2d32400e3c7d226ef6d93fd91654768959695e80;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 4cc2a68..ca4051f 100644 --- a/src/jquery/jquery.js +++ b/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); - - a = m ? - // HANDLE: $(html) -> $(array) - jQuery.clean( [ m[1] ] ) : + if ( m ) + a = jQuery.clean( [ m[1] ] ); - // HANDLE: $(expr) - jQuery.find( a, c ); + // HANDLE: $(expr) + else + return new jQuery( c ).find( a ); } return this.setArray( @@ -1571,7 +1571,7 @@ jQuery.extend({ * @name $.merge * @type Array * @param Array first The first array to merge, the unique elements of second added. - * @param Array second The second array to merge into the first, unalterd. + * @param Array second The second array to merge into the first, unaltered. * @cat JavaScript */ merge: function(first, second) {