mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Added test for passing null to .show()
This commit is contained in:
parent
9cd5866a29
commit
8cb8ae27d8
@ -1,13 +1,19 @@
|
|||||||
module("fx");
|
module("fx");
|
||||||
|
|
||||||
test("show()", function() {
|
test("show()", function() {
|
||||||
expect(15);
|
expect(16);
|
||||||
var pass = true, div = jQuery("#main div");
|
var pass = true, div = jQuery("#main div");
|
||||||
div.show().each(function(){
|
div.show().each(function(){
|
||||||
if ( this.style.display == "none" ) pass = false;
|
if ( this.style.display == "none" ) pass = false;
|
||||||
});
|
});
|
||||||
ok( pass, "Show" );
|
ok( pass, "Show" );
|
||||||
|
|
||||||
|
pass = true;
|
||||||
|
div.hide().show(null).each(function() {
|
||||||
|
if ( this.style.display == "none" ) pass = false;
|
||||||
|
});
|
||||||
|
ok( pass, "Show will null speed");
|
||||||
|
|
||||||
jQuery("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');
|
jQuery("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');
|
||||||
|
|
||||||
var old = jQuery("#show-tests table").show().css("display") !== "table";
|
var old = jQuery("#show-tests table").show().css("display") !== "table";
|
||||||
|
Loading…
Reference in New Issue
Block a user