Make sure that .width()/.height() don't return NaN also standardize on returning instead of auto for default values (which is what we do elsewhere in .css() as well). Fixes #7225.

This commit is contained in:
jeresig 2010-10-22 02:39:06 -04:00
parent 7e02cee5ff
commit 53396b879b
3 changed files with 23 additions and 25 deletions

View file

@ -13,8 +13,8 @@ test("css(String|Hash)", function() {
var div = jQuery( "<div>" );
equals( div.css("width") || "auto", "auto", "Width on disconnected node." );
equals( div.css("height") || "auto", "auto", "Height on disconnected node." );
equals( div.css("width"), "", "Width on disconnected node." );
equals( div.css("height"), "", "Height on disconnected node." );
div.css({ width: 4, height: 4 });