if ( jQuery.css ) { module("css", { teardown: moduleTeardown }); test("css(String|Hash)", function() { expect( 46 ); equal( jQuery("#qunit-fixture").css("display"), "block", "Check for css property \"display\"" ); ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" ); jQuery("#nothiddendiv").css({ display: "none" }); ok( !jQuery("#nothiddendiv").is(":visible"), "Modified CSS display: Assert element is hidden" ); var $child = jQuery("#nothiddendivchild").css({ width: "20%", height: "20%" }); notEqual( $child.css("width"), "20px", "Retrieving a width percentage on the child of a hidden div returns percentage" ); notEqual( $child.css("height"), "20px", "Retrieving a height percentage on the child of a hidden div returns percentage" ); jQuery("#nothiddendiv").css({display: "block"}); ok( jQuery("#nothiddendiv").is(":visible"), "Modified CSS display: Assert element is visible"); ok( jQuery(window).is(":visible"), "Calling is(':visible') on window does not throw an error in IE."); ok( jQuery(document).is(":visible"), "Calling is(':visible') on document does not throw an error in IE."); var div = jQuery( "
" ); // These should be "auto" (or some better value) // temporarily provide "0px" for backwards compat equal( div.css("width"), "0px", "Width on disconnected node." ); equal( div.css("height"), "0px", "Height on disconnected node." ); div.css({ width: 4, height: 4 }); equal( div.css("width"), "4px", "Width on disconnected node." ); equal( div.css("height"), "4px", "Height on disconnected node." ); var div2 = jQuery( "