X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=e2a2a22c09ba0a4820487522d78c1803d3662833;hb=d4849a0d3589ea3d369137f79b102eb68403b489;hp=38dee9c89e834e596e0c764f43c71275fd0dd1ef;hpb=8e105ef9318da2a38019878c6152a4a67d9fceb1;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 38dee9c..e2a2a22 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] ] ); @@ -257,9 +257,9 @@ jQuery.fn = jQuery.prototype = { * @cat Core */ pushStack: function( a ) { - var ret = jQuery(this); + var ret = jQuery(a); ret.prevObject = this; - return ret.setArray( a ); + return ret; }, /** @@ -803,7 +803,7 @@ jQuery.fn = jQuery.prototype = { find: function(t) { return this.pushStack( jQuery.map( this, function(a){ return jQuery.find(t,a); - }) ); + }), t ); }, /** @@ -927,14 +927,14 @@ jQuery.fn = jQuery.prototype = { not: function(t) { return this.pushStack( t.constructor == String && - jQuery.multiFilter(t,this,true) || - - jQuery.grep(this,function(a){ - if ( t.constructor == Array || t.jquery ) - return jQuery.inArray( t, a ) < 0; - else - return a != t; - }) ); + jQuery.multiFilter(t, this, true) || + + jQuery.grep(this, function(a) { + return ( t.constructor == Array || t.jquery ) + ? jQuery.inArray( a, t ) < 0 + : a != t; + }) + ); }, /** @@ -986,7 +986,7 @@ jQuery.fn = jQuery.prototype = { this.get(), t.constructor == String ? jQuery(t).get() : - t.length != undefined && !t.nodeName ? + t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ? t : [t] ) ); }, @@ -1281,7 +1281,7 @@ 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) ) + if ( value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ) return value + "px"; return value;