Skip to content

Commit 504e599

Browse files
committed
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
1 parent 5c88bb7 commit 504e599

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/visual/effects.all.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ $(function() {
1414

1515
$(el).bind("click", function() {
1616

17-
$(this).addClass("current").hide(n, o, duration, function() {
18-
var self = this;
19-
window.setTimeout(function() {
20-
$(self).show(n, o, duration, function() { $(this).removeClass("current"); });
21-
}, wait);
22-
});
17+
$(this).addClass("current")
18+
// delaying the initial animation makes sure that the queue stays in tact
19+
.delay( 10 )
20+
.hide( n, o, duration )
21+
.delay( wait )
22+
.show( n, o, duration, function() {
23+
$( this ).removeClass("current");
24+
});
2325
});
2426

2527
};

0 commit comments

Comments
 (0)