jQuery("#main").append('<div id="show-tests"><span style="position:absolute;">foo</span></div>');
var $span = jQuery("#show-tests span"),
- displayNone = $span.css("display"),
- display = '', num = 0;
-
- $span.show();
-
- display = $span.css("display");
+ displayNone = $span.css("display"),
+ display = '', num = 0;
- $span.hide();
+ $span.show();
- $span.fadeIn(100, function() {
+ display = $span.css("display");
- equals($span.css("display"), display, "Expecting display: " + display);
+ $span.hide();
- $span.fadeOut(100, function () {
-
- equals($span.css("display"), displayNone, "Expecting display: " + displayNone);
-
- $span.fadeIn(100, function() {
-
- equals($span.css("display"), display, "Expecting display: " + display);
-
- start();
- });
- });
- });
+ $span.fadeIn(100, function() {
+ equals($span.css("display"), display, "Expecting display: " + display);
+ $span.fadeOut(100, function () {
+ equals($span.css("display"), displayNone, "Expecting display: " + displayNone);
+ $span.fadeIn(100, function() {
+ equals($span.css("display"), display, "Expecting display: " + display);
+ start();
+ });
+ });
+ });
});
+ test("show() resolves correct default display #8099", function() {
+ expect(3);
+ var bug8099 = jQuery("<tt/>").appendTo("#main");
+
+ equals( bug8099.css("display"), "none", "default display override for all tt" );
+ equals( bug8099.show().css("display"), "inline", "Correctly resolves display:inline" );
+
+ bug8099.remove();
+
+ equals( jQuery("#foo").hide().show().css("display"), "block", "Correctly resolves display:block after hide/show" );
+ });
+
test("animate(Hash, Object, Function)", function() {
expect(1);
stop();