CSS: Make show/hide/toggle methods a module

Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.

Fixes gh-2193
Close gh-2648
This commit is contained in:
Dave Methvin
2015-10-09 15:52:29 -04:00
committed by Timmy Willison
parent e271f665dd
commit 67d7a2eefe
8 changed files with 81 additions and 58 deletions

View File

@@ -54,11 +54,19 @@ QUnit.test( "attributes", function( assert ) {
if ( jQuery.css ) {
QUnit.test( "css", function( assert ) {
assert.expect( 3 );
assert.expect( 1 );
var div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
assert.strictEqual( div.css( "width", "50px" ).css( "width" ), "50px", ".css getter/setter" );
} );
}
if ( jQuery.fn.show && jQuery.fn.hide ) {
QUnit.test( "show/hide", function( assert ) {
assert.expect( 2 );
var div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
div.hide();
assert.strictEqual( div.css( "display" ), "none", "div hidden" );