mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 03:25:13 -05:00
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:
committed by
Timmy Willison
parent
e271f665dd
commit
67d7a2eefe
@@ -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" );
|
||||
|
||||
Reference in New Issue
Block a user