Fixed jQuery bug/enahnced jQuery to not blindly convert anything that's not a string...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 5 Oct 2010 21:51:24 +0000 (21:51 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 5 Oct 2010 21:51:24 +0000 (21:51 +0000)
resources/jquery/jquery.js

index fff6776..27456ef 100644 (file)
@@ -6230,7 +6230,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
                                        jQuery.css( elem, type ) :
 
                                        // Set the width or height on the element (default to pixels if value is unitless)
-                                       this.css( type, typeof size === "string" ? size : size + "px" );
+                                       this.css( type, typeof size === "string" ? size : ( parseInt( size ) || 0 ) + "px" );
        };
 
 });