Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7530 closed bug (worksforme)

Change in behaviour of animate api from v1.4.2 to 1.4.4

Reported by: [email protected] Owned by:
Priority: undecided Milestone:
Component: effects Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


The following behaviour has changed in animate api

In v1.4.2


In this case element is shown first & then animation effect is applied.

In v1.4.3 & v1.4.4


In this case element is hidden, animation transition is applied but element is not visible

If current behaviour of v1.4.4 is expected one then I guess its documentation is missing, please add change documentation for same.

Change History (6)

comment:1 Changed 12 years ago by Sangram Chavan <[email protected]…>

v1.4.2 Element animation is applied immediately by making element visible http://jsfiddle.net/B6GdT/

v1.4.3 & v1.4.4 Element animation gets queued & is applied when element is visible http://jsfiddle.net/6Mzv9/1/

comment:2 Changed 12 years ago by boushley

Sangram, your second fiddle makes it appear that the animation happens once the element is shown, but that is not the case. The animation is happening while the element is hidden, and if you show it before the animation ends, then you'll see the end of the animation. This can be seen in the following fiddle http://jsfiddle.net/boushley/6Mzv9/2/ Just wrapped the show call inside of a click. If you wait until the animation should be done and then click the link... the animation has completed.

comment:3 in reply to:  2 Changed 12 years ago by sangram

boushley, agreed to what you said, but my concern was this was breaking change in terms of UI appearance for which i didn't found any documentation. i.e. change log for v.1.4.3

I had to update all my animation script to have property display:block

To be more clear check this i have just changed jquery libraries

v1.4.2 : http://jsfiddle.net/sangram/B8vPk/3/

v1.4.3 : http://jsfiddle.net/sangram/B8vPk/1/

v1.4.4 : http://jsfiddle.net/sangram/B8vPk/2/

comment:4 Changed 12 years ago by dmethvin

Component: unfiledeffects
Keywords: needsdocs added
Milestone: 1.5
Resolution: worksforme
Status: newclosed

I think the current behavior is correct, .animate() should only be called on visible elements if you want the animation to show. I'll mark this as needsdocs.

comment:5 Changed 12 years ago by addyosmani

The docs for this have now been updated: http://api.jquery.com/animate/. Temporarily leaving the needsdocs tag in place in case we need to expand on the comments I've added.

comment:6 Changed 12 years ago by kswedberg

Keywords: needsdocs removed
Note: See TracTickets for help on using tickets.