X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=jquery%2Fjquery.js;h=b3e28edb230dc2c8239179469fbb50dcf1c0d93e;hb=4737936c0b05236ecafa86f0186b0b236a2ff826;hp=59375613d1f86d2d28deb1fdb29071026867b7e0;hpb=f4c67b7c5aba7fbdaf4b883b71ff9cc1b66e9af8;p=jquery.git diff --git a/jquery/jquery.js b/jquery/jquery.js index 5937561..b3e28ed 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -61,7 +61,7 @@ function jQuery(a,c) { if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in - this.get( a.constructor == Array || a.length && a[0].nodeType ? + this.get( a.constructor == Array || a.length && a[0] != undefined && a[0].nodeType ? // Assume that it's an array of DOM Elements jQuery.merge( a, [] ) : @@ -1107,18 +1107,18 @@ new function() { this.length ? this[0][n] : null : this.attr( n, h ); }; - } - - var css = "width,height,top,left,position,float,overflow,color,background".split(","); - + }; + + var css = "width,height,top,left,position,float,overflow,color,background".split(","); + for ( var i in css ) new function() { var n = css[i]; jQuery.fn[ i ] = function(h) { return h == undefined ? - this.length ? jQuery.css( this[0], n ) : null : + ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; - } + }; }