#7157 closed bug (fixed)
Animation callback shows element is still ":animated"
| Reported by: | Motty | Owned by: | gnarf |
|---|---|---|---|
| Priority: | low | Milestone: | 1.8 |
| Component: | effects | Version: | 1.4.2 |
| Keywords: | animation callback | Cc: | |
| Blocked by: | Blocking: |
Description
After an element has completed its animation, the callback still shows that the element is animated. I posted a demo here: http://jsfiddle.net/5V5M3/
$(".block").animate({
"left": "+=50px"
}, "slow", function() {
alert($(".block").is(':animated'));
});
I can hack around it by basically using a setTimeout:
$(".block").animate({
"left": "+=50px"
}, "slow", function() {
setTimeout(function() { alert($(".block").is(':animated')) }, 0);
});
Change History (9)
comment:1 Changed 9 years ago by
| Status: | new → open |
|---|
comment:2 Changed 9 years ago by
| Milestone: | 1.4.3 |
|---|
comment:4 Changed 8 years ago by
There is a test case in https://github.com/jquery/jquery/pull/273 that might be handy.
comment:5 Changed 8 years ago by
| Owner: | set to timmywil |
|---|---|
| Priority: | undecided → low |
| Status: | open → assigned |
comment:6 Changed 8 years ago by
| Milestone: | 1.next → 1.8 |
|---|
comment:7 Changed 7 years ago by
| Owner: | changed from timmywil to gnarf |
|---|
comment:8 Changed 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fix #7157. Animation callbacks shouldn't see an element as :animated.
Unless of course, there are other animations to be done! Closes gh-775.
Changeset: 6bf3f20d4e0f69ab14702152880a0574623490e2
Note: See
TracTickets for help on using
tickets.

Resetting milestone to future.