X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=004d6341a3f618d4d4ee1bbf0ea16f36b0f11d1a;hb=fd0f42bf5cf18d311db78680e4d28bc6ff1b016c;hp=933e97433b11eb31a7d036d2942502e907915404;hpb=0eb642cc1f515f6c072c9ed96dfd757cb44f1656;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 933e974..004d634 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -38,7 +38,7 @@ var jQuery = function(a,c) { // Handle HTML strings if ( typeof a == "string" ) { // HANDLE: $(html) -> $(array) - var m = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a); + var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); @@ -1281,10 +1281,9 @@ jQuery.extend({ 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) ) - return value + "px"; - - return value; + return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ? + value + "px" : + value; }, className: {