aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-03-27 06:32:04 -0500
committergnarf <gnarf@gnarf.net>2011-03-27 06:32:04 -0500
commit504e5995692a9d4444f8dd78c610f2fa5355fffb (patch)
treecbc42f6dc5110b377b8ea9726bd9070b4db82a99
parent5c88bb702fcde5294a4ab357d249fe892309b997 (diff)
downloadjquery-ui-504e5995692a9d4444f8dd78c610f2fa5355fffb.tar.gz
jquery-ui-504e5995692a9d4444f8dd78c610f2fa5355fffb.zip
effects.tests: changing the way the effects test runs - using delay() instead of callbacks can help us see if we have places where we destroyed the queue
-rw-r--r--tests/visual/effects.all.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/visual/effects.all.js b/tests/visual/effects.all.js
index 5e47a4f48..f678c6276 100644
--- a/tests/visual/effects.all.js
+++ b/tests/visual/effects.all.js
@@ -14,12 +14,14 @@ $(function() {
$(el).bind("click", function() {
- $(this).addClass("current").hide(n, o, duration, function() {
- var self = this;
- window.setTimeout(function() {
- $(self).show(n, o, duration, function() { $(this).removeClass("current"); });
- }, wait);
- });
+ $(this).addClass("current")
+ // delaying the initial animation makes sure that the queue stays in tact
+ .delay( 10 )
+ .hide( n, o, duration )
+ .delay( wait )
+ .show( n, o, duration, function() {
+ $( this ).removeClass("current");
+ });
});
};