$().css("foo") now returns the value of $.css("foo") instead of setting to null.

1.7/enhancement_8685
John Resig 2006-04-09 04:03:36 +00:00
parent 56992c6ad9
commit 4ab5a88bc4
1 changed files with 8 additions and 7 deletions

15
jquery/jquery.js vendored
View File

@ -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(){