Bug Tracker

Modify

Ticket #7157 (closed bug: fixed)

Opened 4 years ago

Last modified 23 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 4 years ago by snover

  • Status changed from new to open

comment:2 Changed 3 years ago by snover

  • Milestone 1.4.3 deleted

Resetting milestone to future.

comment:3 Changed 3 years ago by ajpiano

  • Milestone set to 1.next

Still an issue in jQuery 1.5.2rc

comment:4 Changed 3 years ago by dmethvin

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

comment:5 Changed 3 years ago by timmywil

  • Owner set to timmywil
  • Priority changed from undecided to low
  • Status changed from open to assigned

comment:6 Changed 3 years ago by timmywil

  • Milestone changed from 1.next to 1.8

comment:7 Changed 2 years ago by gnarf

  • Owner changed from timmywil to gnarf

comment:8 Changed 2 years ago by Corey Frang

  • Status changed from assigned to closed
  • Resolution set to fixed

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

comment:9 Changed 23 months ago by gnarf

#11846 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.