X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=jquery%2Fjquery.js;h=668a592d5892f1b77bda19b21b9ccf408290a86e;hb=40fdf0ad5c0dd13546a2a0925778605c5e7b1173;hp=66588f51d0cea90acc8d5d0533cdc54ec58f4b3f;hpb=e3828d1a483527ecf70944044134f09196011d66;p=jquery.git diff --git a/jquery/jquery.js b/jquery/jquery.js index 66588f5..668a592 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -67,13 +67,14 @@ function $(a,c) { }, css: function(a,b) { - return this.each(function(){ - if ( !b ) - for ( var j in a ) - $.attr(this.style,j,a[j]); - else - $.attr(this.style,a,b); - }); + return a.constructor != String || b ? + this.each(function(){ + if ( !b ) + for ( var j in a ) + $.attr(this.style,j,a[j]); + else + $.attr(this.style,a,b); + }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){