mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
jquery fx: Closes #3219. jQuery.fn.toggle can accept a boolean argument indicating show/hide.
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user