Commit 4ab5a88b authored by John Resig's avatar John Resig

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

parent 56992c6a
......@@ -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(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment