Skip to main content

Bug Tracker

Side navigation

#7157 closed bug (fixed)

Opened October 12, 2010 04:52AM UTC

Closed May 18, 2012 05:54PM UTC

Last modified June 05, 2012 06:39PM UTC

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);
});
Attachments (0)
Change History (9)

Changed October 13, 2010 12:46AM UTC by snover comment:1

status: newopen

Changed November 12, 2010 02:40AM UTC by snover comment:2

milestone: 1.4.3

Resetting milestone to future.

Changed March 30, 2011 07:59PM UTC by ajpiano comment:3

milestone: → 1.next

Still an issue in jQuery 1.5.2rc

Changed April 10, 2011 07:54PM UTC by dmethvin comment:4

There is a test case in https://github.com/jquery/jquery/pull/273 that might be handy.

Changed July 12, 2011 05:21PM UTC by timmywil comment:5

owner: → timmywil
priority: undecidedlow
status: openassigned

Changed September 29, 2011 02:17PM UTC by timmywil comment:6

milestone: 1.next1.8

Changed May 11, 2012 09:16PM UTC by gnarf comment:7

owner: timmywilgnarf

Changed May 18, 2012 05:54PM UTC by Corey Frang comment:8

resolution: → fixed
status: assignedclosed

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

Changed June 05, 2012 06:39PM UTC by gnarf comment:9

#11846 is a duplicate of this ticket.