Skip to content
Permalink
Browse files

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
  • Loading branch information...
gnarf committed Mar 27, 2011
1 parent 5c88bb7 commit 504e5995692a9d4444f8dd78c610f2fa5355fffb
Showing with 8 additions and 6 deletions.
  1. +8 −6 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");
});
});

};

0 comments on commit 504e599

Please sign in to comment.
You can’t perform that action at this time.