#7530 closed bug (worksforme)
Change in behaviour of animate api from v1.4.2 to 1.4.4
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | effects | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following behaviour has changed in animate api
In v1.4.2
jQuery('#elementId').hide().animate({height:'20px'},1000);
In this case element is shown first & then animation effect is applied.
In v1.4.3 & v1.4.4
jQuery('#elementId').hide().animate({height:'20px'},1000);
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
comment:2 follow-up: 3 Changed 12 years ago by
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 Changed 12 years ago by
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/
comment:4 Changed 12 years ago by
Component: | unfiled → effects |
---|---|
Keywords: | needsdocs added |
Milestone: | 1.5 |
Resolution: | → worksforme |
Status: | new → closed |
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
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
Keywords: | needsdocs removed |
---|
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/