diff --git a/tests/unit/effects/effects.html b/tests/unit/effects/effects.html
index c283eabff23..7ddacf7bb66 100644
--- a/tests/unit/effects/effects.html
+++ b/tests/unit/effects/effects.html
@@ -96,7 +96,9 @@
-
+
Child Element Test
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index c9b1e1b4a8b..928d4c15bb7 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -28,6 +28,14 @@ test( "Immediate Return Conditions", function() {
equal( ++count, 3, "Both Functions worked properly" );
});
+test( ".hide() with hidden parent", function() {
+ expect( 1 );
+ var element = $( "div.hidden" ).children();
+ element.hide( "blind", function() {
+ equal( element.css( "display" ), "none", "display: none" );
+ });
+});
+
asyncTest( "Parse of null for options", function() {
var hidden = $( "div.hidden" ),
count = 0;
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index 97f006ee06a..41aeb4819ab 100644
--- a/ui/jquery.ui.effect.js
+++ b/ui/jquery.ui.effect.js
@@ -1150,9 +1150,10 @@ $.fn.extend({
}
}
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
+ // If the element already has the correct final state, delegate to
+ // the core methods so the internal tracking of "olddisplay" works.
if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+ elem[ mode ]();
done();
} else {
effectMethod.call( elem[0], args, done );