X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=085b576b9e74a1e30804a86e26534ea1a4a33db5;hb=b98898d95be5cb7bb8b9fdb0d8a2595fc8d9cdf9;hp=9dcccb93a1af75d87e150e2a74d58c5b1095eea8;hpb=689739072f858d5e48d2c0394204dc17eba9e4e1;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 9dcccb9..085b576 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( @@ -985,7 +985,7 @@ jQuery.fn = jQuery.prototype = { add: function(t) { return this.pushStack( jQuery.merge( this.get(), - typeof t == "string" ? jQuery(t).get() : t ) + typeof t == "string" ? jQuery(t).get() : t.length ? t : [t] ) ); }, @@ -1268,7 +1268,7 @@ jQuery.extend({ return value.call( elem, [index] ); // exclude the following css properties to add px - var exclude = /z-?index|font-?weight|opacity/i; + var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; // Handle passing in a number to a CSS property if ( value.constructor == Number && type == "curCSS" && !exclude.test(prop) )