jquery fx: Closes #3219. jQuery.fn.toggle can accept a boolean argument indicating show/hide.
This commit is contained in:
parent
0a8f96ac3d
commit
654d946ead
2 changed files with 16 additions and 6 deletions
|
@ -155,13 +155,20 @@ test("stop(clearQueue, gotoEnd)", function() {
|
|||
});
|
||||
|
||||
test("toggle()", function() {
|
||||
expect(3);
|
||||
expect(6);
|
||||
var x = jQuery("#foo");
|
||||
ok( x.is(":visible"), "is visible" );
|
||||
x.toggle();
|
||||
ok( x.is(":hidden"), "is hidden" );
|
||||
x.toggle();
|
||||
ok( x.is(":visible"), "is visible again" );
|
||||
|
||||
x.toggle(true);
|
||||
ok( x.is(":visible"), "is visible" );
|
||||
x.toggle(false);
|
||||
ok( x.is(":hidden"), "is hidden" );
|
||||
x.toggle(true);
|
||||
ok( x.is(":visible"), "is visible again" );
|
||||
});
|
||||
|
||||
var visible = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue