aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2011-06-23 07:22:34 -0500
committerCorey Frang <gnarf@gnarf.net>2011-06-23 07:22:34 -0500
commitd18cd7ed0f41213aca9f29ae67c360ca6b21abfa (patch)
tree81cd6ee8279ec81d4ac85ac2dc24905d237320a1 /tests
parenta89ff4098a6149817061a752ec3755127f554407 (diff)
downloadjquery-ui-d18cd7ed0f41213aca9f29ae67c360ca6b21abfa.tar.gz
jquery-ui-d18cd7ed0f41213aca9f29ae67c360ca6b21abfa.zip
Effects.core: Check Visibility vs 'hide' and 'show' modes, finish immediately if neccessary - Fixes #6715 - Hide and Show try to affect hidden and showing elements
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/effects/effects_core.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index fd6b4d378..f78aea304 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -19,6 +19,18 @@ var minDuration = 15,
module( "effects.core" );
+test( "Immediate Return Conditions", function() {
+ var hidden = $( "div.hidden" ),
+ count = 0;
+ expect( 6 );
+ hidden.hide( "blind", function() {
+ equal( ++count, 1, "Hide on hidden returned immediately" );
+ }).show().show( "blind", function() {
+ equal( ++count, 2, "Show on shown returned immediately" );
+ });
+ equal( ++count, 3, "Both Functions worked properly" );
+});
+
$.each( $.effects.effect, function( effect ) {
if ( effect === "transfer" ) {
return;