3 test("sanity check", function() {
5 ok( jQuery("#dl:visible, #main:visible, #foo:visible").length === 3, "QUnit state is correct for testing effects" );
8 test("show()", function() {
11 var hiddendiv = jQuery("div.hidden");
13 hiddendiv.hide().show();
15 equals( hiddendiv.css("display"), "block", "Make sure a pre-hidden div is visible." );
19 hiddendiv = jQuery("div.hidden");
21 equal(jQuery.css( hiddendiv[0], "display"), "none", "hiddendiv is display: none");
23 hiddendiv.css("display", "block");
24 equal(jQuery.css( hiddendiv[0], "display"), "block", "hiddendiv is display: block");
27 equal(jQuery.css( hiddendiv[0], "display"), "block", "hiddendiv is display: block");
29 hiddendiv.css("display","");
31 var pass = true, div = jQuery("#main div");
32 div.show().each(function(){
33 if ( this.style.display == "none" ) pass = false;
39 "undefined speed": undefined,
40 "empty string speed": "",
44 jQuery.each(speeds, function(name, speed) {
46 div.hide().show(speed).each(function() {
47 if ( this.style.display == "none" ) pass = false;
49 ok( pass, "Show with " + name);
53 jQuery.each(speeds, function(name, speed) {
55 div.hide().show(speed, function() {
58 ok( pass, "Show with " + name + " does not call animate callback" );
61 // #show-tests * is set display: none in CSS
62 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><table id="test-table"></table>');
64 var old = jQuery("#test-table").show().css("display") !== "table";
65 jQuery("#test-table").remove();
74 "table" : old ? "block" : "table",
75 "thead" : old ? "block" : "table-header-group",
76 "tbody" : old ? "block" : "table-row-group",
77 "tr" : old ? "block" : "table-row",
78 "th" : old ? "block" : "table-cell",
79 "td" : old ? "block" : "table-cell",
81 "li" : old ? "block" : "list-item"
84 jQuery.each(test, function(selector, expected) {
85 var elem = jQuery(selector, "#show-tests").show();
86 equals( elem.css("display"), expected, "Show using correct display type for " + selector );
90 test("show(Number) - other displays", function() {
95 // #show-tests * is set display: none in CSS
96 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><table id="test-table"></table>');
98 var old = jQuery("#test-table").show().css("display") !== "table",
100 jQuery("#test-table").remove();
109 "table" : old ? "block" : "table",
110 "thead" : old ? "block" : "table-header-group",
111 "tbody" : old ? "block" : "table-row-group",
112 "tr" : old ? "block" : "table-row",
113 "th" : old ? "block" : "table-cell",
114 "td" : old ? "block" : "table-cell",
116 "li" : old ? "block" : "list-item"
119 jQuery.each(test, function(selector, expected) {
120 var elem = jQuery(selector, "#show-tests").show(1, function() {
121 equals( elem.css("display"), expected, "Show using correct display type for " + selector );
122 if ( ++num === 15 ) {
129 test("animate(Hash, Object, Function)", function() {
132 var hash = {opacity: 'show'};
133 var hashCopy = jQuery.extend({}, hash);
134 jQuery('#foo').animate(hash, 0, function() {
135 equals( hash.opacity, hashCopy.opacity, 'Check if animate changed the hash parameter' );
140 test("animate negative height", function() {
143 jQuery("#foo").animate({ height: -100 }, 100, function() {
144 equals( this.offsetHeight, 0, "Verify height." );
149 test("animate block as inline width/height", function() {
152 var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
153 expected = span.css("display");
157 if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
160 jQuery("#foo").css({ display: "inline", width: '', height: '' }).animate({ width: 42, height: 42 }, 100, function() {
161 equals( jQuery(this).css("display"), jQuery.support.inlineBlockNeedsLayout ? "inline" : "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
162 equals( this.offsetWidth, 42, "width was animated" );
163 equals( this.offsetHeight, 42, "height was animated" );
167 // Browser doesn't support inline-block
169 ok( true, "Browser doesn't support inline-block" );
170 ok( true, "Browser doesn't support inline-block" );
171 ok( true, "Browser doesn't support inline-block" );
175 test("animate native inline width/height", function() {
178 var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
179 expected = span.css("display");
183 if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
185 jQuery("#foo").css({ display: "", width: '', height: '' })
186 .append('<span>text</span>')
188 .animate({ width: 42, height: 42 }, 100, function() {
189 equals( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
190 equals( this.offsetWidth, 42, "width was animated" );
191 equals( this.offsetHeight, 42, "height was animated" );
195 // Browser doesn't support inline-block
197 ok( true, "Browser doesn't support inline-block" );
198 ok( true, "Browser doesn't support inline-block" );
199 ok( true, "Browser doesn't support inline-block" );
203 test("animate block width/height", function() {
206 jQuery("#foo").css({ display: "block", width: 20, height: 20 }).animate({ width: 42, height: 42 }, 100, function() {
207 equals( jQuery(this).css("display"), "block", "inline-block was not set on block element when animating width/height" );
208 equals( this.offsetWidth, 42, "width was animated" );
209 equals( this.offsetHeight, 42, "height was animated" );
214 test("animate table width/height", function() {
218 var displayMode = jQuery("#table").css("display") !== "table" ? "block" : "table";
220 jQuery("#table").animate({ width: 42, height: 42 }, 100, function() {
221 equals( jQuery(this).css("display"), displayMode, "display mode is correct" );
226 test("animate table-row width/height", function() {
229 var tr = jQuery("#table")
230 .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 })
231 .html("<tr style='height:42px;'><td style='padding:0;'><div style='width:20px;height:20px;'></div></td></tr>")
234 // IE<8 uses “block” instead of the correct display type
235 var displayMode = tr.css("display") !== "table-row" ? "block" : "table-row";
237 tr.animate({ width: 10, height: 10 }, 100, function() {
238 equals( jQuery(this).css("display"), displayMode, "display mode is correct" );
239 equals( this.offsetWidth, 20, "width animated to shrink wrap point" );
240 equals( this.offsetHeight, 20, "height animated to shrink wrap point" );
245 test("animate table-cell width/height", function() {
248 var td = jQuery("#table")
249 .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 })
250 .html("<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>")
253 // IE<8 uses “block” instead of the correct display type
254 var displayMode = td.css("display") !== "table-cell" ? "block" : "table-cell";
256 td.animate({ width: 10, height: 10 }, 100, function() {
257 equals( jQuery(this).css("display"), displayMode, "display mode is correct" );
258 equals( this.offsetWidth, 20, "width animated to shrink wrap point" );
259 equals( this.offsetHeight, 20, "height animated to shrink wrap point" );
264 test("animate resets overflow-x and overflow-y when finished", function() {
268 .css({ display: "block", width: 20, height: 20, overflowX: "visible", overflowY: "auto" })
269 .animate({ width: 42, height: 42 }, 100, function() {
270 equals( this.style.overflowX, "visible", "overflow-x is visible" );
271 equals( this.style.overflowY, "auto", "overflow-y is auto" );
276 /* // This test ends up being flaky depending upon the CPU load
277 test("animate option (queue === false)", function () {
283 var $foo = jQuery("#foo");
284 $foo.animate({width:'100px'}, 3000, function () {
285 // should finish after unqueued animation so second
287 same( order, [ 1, 2 ], "Animations finished in the correct order" );
290 $foo.animate({fontSize:'2em'}, {queue:false, duration:10, complete:function () {
291 // short duration and out of queue so should finish first
297 test("animate with no properties", function() {
300 var divs = jQuery("div"), count = 0;
302 divs.animate({}, function(){
306 equals( divs.length, count, "Make sure that callback is called for each element in the set." );
310 var foo = jQuery("#foo");
313 foo.animate({top: 10}, 100, function(){
314 ok( true, "Animation was properly dequeued." );
319 test("animate duration 0", function() {
324 var $elems = jQuery([{ a:0 },{ a:0 }]), counter = 0;
326 equals( jQuery.timers.length, 0, "Make sure no animation was running from another test" );
328 $elems.eq(0).animate( {a:1}, 0, function(){
329 ok( true, "Animate a simple property." );
333 // Failed until [6115]
334 equals( jQuery.timers.length, 0, "Make sure synchronic animations are not left on jQuery.timers" );
336 equals( counter, 1, "One synchronic animations" );
338 $elems.animate( { a:2 }, 0, function(){
339 ok( true, "Animate a second simple property." );
343 equals( counter, 3, "Multiple synchronic animations" );
345 $elems.eq(0).animate( {a:3}, 0, function(){
346 ok( true, "Animate a third simple property." );
349 $elems.eq(1).animate( {a:3}, 200, function(){
351 // Failed until [6115]
352 equals( counter, 5, "One synchronic and one asynchronic" );
356 var $elem = jQuery("<div />");
357 $elem.show(0, function(){
358 ok(true, "Show callback with no duration");
360 $elem.hide(0, function(){
361 ok(true, "Hide callback with no duration");
365 test("animate hyphenated properties", function(){
369 jQuery("#nothiddendiv")
370 .css("font-size", 10)
371 .animate({"font-size": 20}, 200, function(){
372 equals( this.style.fontSize, "20px", "The font-size property was animated." );
377 test("animate non-element", function(){
381 var obj = { test: 0 };
383 jQuery(obj).animate({test: 200}, 200, function(){
384 equals( obj.test, 200, "The custom property should be modified." );
389 test("stop()", function() {
393 var $foo = jQuery("#nothiddendiv");
395 $foo.hide().width(200).width();
397 $foo.animate({ width:'show' }, 1000);
398 setTimeout(function(){
399 var nw = $foo.width();
400 notEqual( nw, w, "An animation occurred " + nw + "px " + w + "px");
404 notEqual( nw, w, "Stop didn't reset the animation " + nw + "px " + w + "px");
405 setTimeout(function(){
406 equals( nw, $foo.width(), "The animation didn't continue" );
412 test("stop() - several in queue", function() {
416 var $foo = jQuery("#nothiddendivchild");
418 $foo.hide().width(200).width();
420 $foo.animate({ width:'show' }, 1000);
421 $foo.animate({ width:'hide' }, 1000);
422 $foo.animate({ width:'show' }, 1000);
423 setTimeout(function(){
424 equals( $foo.queue().length, 3, "All 3 still in the queue" );
425 var nw = $foo.width();
426 notEqual( nw, w, "An animation occurred " + nw + "px " + w + "px");
430 notEqual( nw, w, "Stop didn't reset the animation " + nw + "px " + w + "px");
437 test("stop(clearQueue)", function() {
441 var $foo = jQuery("#nothiddendiv");
443 $foo.hide().width(200).width();
445 $foo.animate({ width:'show' }, 1000);
446 $foo.animate({ width:'hide' }, 1000);
447 $foo.animate({ width:'show' }, 1000);
448 setTimeout(function(){
449 var nw = $foo.width();
450 ok( nw != w, "An animation occurred " + nw + "px " + w + "px");
454 ok( nw != w, "Stop didn't reset the animation " + nw + "px " + w + "px");
456 equals( $foo.queue().length, 0, "The animation queue was cleared" );
457 setTimeout(function(){
458 equals( nw, $foo.width(), "The animation didn't continue" );
464 test("stop(clearQueue, gotoEnd)", function() {
468 var $foo = jQuery("#nothiddendivchild");
470 $foo.hide().width(200).width();
472 $foo.animate({ width:'show' }, 1000);
473 $foo.animate({ width:'hide' }, 1000);
474 $foo.animate({ width:'show' }, 1000);
475 $foo.animate({ width:'hide' }, 1000);
476 setTimeout(function(){
477 var nw = $foo.width();
478 ok( nw != w, "An animation occurred " + nw + "px " + w + "px");
479 $foo.stop(false, true);
482 // Disabled, being flaky
483 //equals( nw, 1, "Stop() reset the animation" );
485 setTimeout(function(){
486 // Disabled, being flaky
487 //equals( $foo.queue().length, 2, "The next animation continued" );
494 test("toggle()", function() {
496 var x = jQuery("#nothiddendiv");
497 ok( x.is(":visible"), "is visible" );
499 ok( x.is(":hidden"), "is hidden" );
501 ok( x.is(":visible"), "is visible again" );
504 ok( x.is(":visible"), "is visible" );
506 ok( x.is(":hidden"), "is hidden" );
508 ok( x.is(":visible"), "is visible again" );
511 jQuery.checkOverflowDisplay = function(){
512 var o = jQuery.css( this, "overflow" );
514 equals(o, "visible", "Overflow should be visible: " + o);
515 equals(jQuery.css( this, "display" ), "inline", "Display shouldn't be tampered with.");
520 test("JS Overflow and Display", function() {
523 jQuery.makeTest( "JS Overflow and Display" )
524 .addClass("widewidth")
525 .css({ overflow: "visible", display: "inline" })
526 .addClass("widewidth")
527 .text("Some sample text.")
528 .before("text before")
530 .animate({ opacity: 0.5 }, "slow", jQuery.checkOverflowDisplay);
533 test("CSS Overflow and Display", function() {
536 jQuery.makeTest( "CSS Overflow and Display" )
537 .addClass("overflow inline")
538 .addClass("widewidth")
539 .text("Some sample text.")
540 .before("text before")
542 .animate({ opacity: 0.5 }, "slow", jQuery.checkOverflowDisplay);
546 "CSS Auto": function(elem,prop){
547 jQuery(elem).addClass("auto" + prop)
548 .text("This is a long string of text.");
551 "JS Auto": function(elem,prop){
552 jQuery(elem).css(prop,"")
553 .text("This is a long string of text.");
556 "CSS 100": function(elem,prop){
557 jQuery(elem).addClass("large" + prop);
560 "JS 100": function(elem,prop){
561 jQuery(elem).css(prop,prop == "opacity" ? 1 : "100px");
562 return prop == "opacity" ? 1 : 100;
564 "CSS 50": function(elem,prop){
565 jQuery(elem).addClass("med" + prop);
568 "JS 50": function(elem,prop){
569 jQuery(elem).css(prop,prop == "opacity" ? 0.50 : "50px");
570 return prop == "opacity" ? 0.5 : 50;
572 "CSS 0": function(elem,prop){
573 jQuery(elem).addClass("no" + prop);
576 "JS 0": function(elem,prop){
577 jQuery(elem).css(prop,prop == "opacity" ? 0 : "0px");
582 "show": function(elem,prop){
583 jQuery(elem).hide().addClass("wide"+prop);
586 "hide": function(elem,prop){
587 jQuery(elem).addClass("wide"+prop);
590 "100": function(elem,prop){
591 jQuery(elem).addClass("wide"+prop);
592 return prop == "opacity" ? 1 : 100;
594 "50": function(elem,prop){
595 return prop == "opacity" ? 0.50 : 50;
597 "0": function(elem,prop){
598 jQuery(elem).addClass("noback");
602 test(fn + " to " + tn, function() {
603 var elem = jQuery.makeTest( fn + " to " + tn );
605 var t_w = t( elem, "width" );
606 var f_w = f( elem, "width" );
607 var t_h = t( elem, "height" );
608 var f_h = f( elem, "height" );
609 var t_o = t( elem, "opacity" );
610 var f_o = f( elem, "opacity" );
614 if ( t_h == "show" ) num++;
615 if ( t_w == "show" ) num++;
616 if ( t_w == "hide"||t_w == "show" ) num++;
617 if ( t_h == "hide"||t_h == "show" ) num++;
618 if ( t_o == "hide"||t_o == "show" ) num++;
619 if ( t_w == "hide" ) num++;
620 if ( t_o.constructor == Number ) num += 2;
621 if ( t_w.constructor == Number ) num += 2;
622 if ( t_h.constructor == Number ) num +=2;
627 var anim = { width: t_w, height: t_h, opacity: t_o };
629 elem.animate(anim, 50, function(){
631 equals( this.style.display, "block", "Showing, display should block: " + this.style.display);
633 if ( t_w == "hide"||t_w == "show" )
634 ok(f_w === "" ? this.style.width === f_w : this.style.width.indexOf(f_w) === 0, "Width must be reset to " + f_w + ": " + this.style.width);
636 if ( t_h == "hide"||t_h == "show" )
637 ok(f_h === "" ? this.style.height === f_h : this.style.height.indexOf(f_h) === 0, "Height must be reset to " + f_h + ": " + this.style.height);
639 var cur_o = jQuery.style(this, "opacity");
641 if ( t_o == "hide" || t_o == "show" )
642 equals(cur_o, f_o, "Opacity must be reset to " + f_o + ": " + cur_o);
645 equals(this.style.display, "none", "Hiding, display should be none: " + this.style.display);
647 if ( t_o.constructor == Number ) {
648 equals(cur_o, t_o, "Final opacity should be " + t_o + ": " + cur_o);
650 ok(jQuery.css(this, "opacity") != "" || cur_o == t_o, "Opacity should be explicitly set to " + t_o + ", is instead: " + cur_o);
653 if ( t_w.constructor == Number ) {
654 equals(this.style.width, t_w + "px", "Final width should be " + t_w + ": " + this.style.width);
656 var cur_w = jQuery.css(this,"width");
658 ok(this.style.width != "" || cur_w == t_w, "Width should be explicitly set to " + t_w + ", is instead: " + cur_w);
661 if ( t_h.constructor == Number ) {
662 equals(this.style.height, t_h + "px", "Final height should be " + t_h + ": " + this.style.height);
664 var cur_h = jQuery.css(this,"height");
666 ok(this.style.height != "" || cur_h == t_h, "Height should be explicitly set to " + t_h + ", is instead: " + cur_w);
669 if ( t_h == "show" ) {
670 var old_h = jQuery.css(this, "height");
671 jQuery(this).append("<br/>Some more text<br/>and some more...");
673 if ( /Auto/.test( fn ) ) {
674 notEqual(jQuery.css(this, "height"), old_h, "Make sure height is auto.");
676 equals(jQuery.css(this, "height"), old_h, "Make sure height is not auto.");
686 jQuery.fn.saveState = function(hiddenOverflow){
687 var check = ['opacity','height','width','display','overflow'];
688 expect(check.length);
691 return this.each(function(){
694 jQuery.each(check, function(i,c){
695 self.save[c] = c === "overflow" && hiddenOverflow ? "hidden" : self.style[ c ] || jQuery.css(self,c);
700 jQuery.checkState = function(){
702 jQuery.each(this.save, function(c,v){
703 var cur = self.style[ c ] || jQuery.css(self, c);
704 equals( cur, v, "Make sure that " + c + " is reset (Old: " + v + " Cur: " + cur + ")");
710 test("Chain fadeOut fadeIn", function() {
711 jQuery('#fadein div').saveState().fadeOut('fast').fadeIn('fast',jQuery.checkState);
713 test("Chain fadeIn fadeOut", function() {
714 jQuery('#fadeout div').saveState().fadeIn('fast').fadeOut('fast',jQuery.checkState);
717 test("Chain hide show", function() {
718 jQuery('#show div').saveState(jQuery.support.shrinkWrapBlocks).hide('fast').show('fast',jQuery.checkState);
720 test("Chain show hide", function() {
721 jQuery('#hide div').saveState(jQuery.support.shrinkWrapBlocks).show('fast').hide('fast',jQuery.checkState);
723 test("Chain show hide with easing and callback", function() {
724 jQuery('#hide div').saveState().show('fast').hide('fast','linear',jQuery.checkState);
727 test("Chain toggle in", function() {
728 jQuery('#togglein div').saveState(jQuery.support.shrinkWrapBlocks).toggle('fast').toggle('fast',jQuery.checkState);
730 test("Chain toggle out", function() {
731 jQuery('#toggleout div').saveState(jQuery.support.shrinkWrapBlocks).toggle('fast').toggle('fast',jQuery.checkState);
733 test("Chain toggle out with easing and callback", function() {
734 jQuery('#toggleout div').saveState(jQuery.support.shrinkWrapBlocks).toggle('fast').toggle('fast','linear',jQuery.checkState);
736 test("Chain slideDown slideUp", function() {
737 jQuery('#slidedown div').saveState(jQuery.support.shrinkWrapBlocks).slideDown('fast').slideUp('fast',jQuery.checkState);
739 test("Chain slideUp slideDown", function() {
740 jQuery('#slideup div').saveState(jQuery.support.shrinkWrapBlocks).slideUp('fast').slideDown('fast',jQuery.checkState);
742 test("Chain slideUp slideDown with easing and callback", function() {
743 jQuery('#slideup div').saveState(jQuery.support.shrinkWrapBlocks).slideUp('fast').slideDown('fast','linear',jQuery.checkState);
746 test("Chain slideToggle in", function() {
747 jQuery('#slidetogglein div').saveState(jQuery.support.shrinkWrapBlocks).slideToggle('fast').slideToggle('fast',jQuery.checkState);
749 test("Chain slideToggle out", function() {
750 jQuery('#slidetoggleout div').saveState(jQuery.support.shrinkWrapBlocks).slideToggle('fast').slideToggle('fast',jQuery.checkState);
753 test("Chain fadeToggle in", function() {
754 jQuery('#fadetogglein div').saveState().fadeToggle('fast').fadeToggle('fast',jQuery.checkState);
756 test("Chain fadeToggle out", function() {
757 jQuery('#fadetoggleout div').saveState().fadeToggle('fast').fadeToggle('fast',jQuery.checkState);
760 test("Chain fadeTo 0.5 1.0 with easing and callback)", function() {
761 jQuery('#fadeto div').saveState().fadeTo('fast',0.5).fadeTo('fast',1.0,'linear',jQuery.checkState);
764 jQuery.makeTest = function( text ){
765 var elem = jQuery("<div></div>")
766 .attr("id", "test" + jQuery.makeTest.id++)
771 .appendTo("#fx-tests")
773 jQuery(this).next().toggle();
780 jQuery.makeTest.id = 1;
782 test("jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function () {
786 var $checkedtest = jQuery("#checkedtest");
787 // IE6 was clearing "checked" in jQuery(elem).show("fast");
788 $checkedtest.hide().show("fast", function() {
789 ok( !! jQuery(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." );
790 ok( ! jQuery(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." );
791 ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );
792 ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );
797 test("animate with per-property easing", function(){
802 var _test1_called = false;
803 var _test2_called = false;
804 var _default_test_called = false;
806 jQuery.easing['_test1'] = function() {
807 _test1_called = true;
810 jQuery.easing['_test2'] = function() {
811 _test2_called = true;
814 jQuery.easing['_default_test'] = function() {
815 _default_test_called = true;
818 jQuery({a:0,b:0,c:0}).animate({
822 }, 400, '_default_test', function(){
824 ok(_test1_called, "Easing function (1) called");
825 ok(_test2_called, "Easing function (2) called");
826 ok(_default_test_called, "Easing function (_default) called");
831 test("hide hidden elements (bug #7141)", function() {
835 var div = jQuery("<div style='display:none'></div>").appendTo("#main");
836 equals( div.css("display"), "none", "Element is hidden by default" );
838 ok( !div.data("olddisplay"), "olddisplay is undefined after hiding an already-hidden element" );
840 equals( div.css("display"), "block", "Show a double-hidden element" );
845 test("hide hidden elements, with animation (bug #7141)", function() {
850 var div = jQuery("<div style='display:none'></div>").appendTo("#main");
851 equals( div.css("display"), "none", "Element is hidden by default" );
852 div.hide(1, function () {
853 ok( !div.data("olddisplay"), "olddisplay is undefined after hiding an already-hidden element" );
854 div.show(1, function () {
855 equals( div.css("display"), "block", "Show a double-hidden element" );