Side navigation
#7530 closed bug (worksforme)
Opened November 16, 2010 09:03AM UTC
Closed November 20, 2010 05:54PM UTC
Last modified March 31, 2011 03:06AM UTC
Change in behaviour of animate api from v1.4.2 to 1.4.4
Reported by: | sangram113@gmail.com | 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.
Attachments (0)
Change History (6)
Changed November 16, 2010 09:30AM UTC by comment:1
Changed November 16, 2010 03:46PM UTC by comment:2
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.
Changed November 17, 2010 07:20AM UTC by comment:3
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/
Changed November 20, 2010 05:54PM UTC by comment:4
component: | unfiled → effects |
---|---|
keywords: | → needsdocs |
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.
Changed February 09, 2011 09:36PM UTC by comment:5
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.
Changed March 31, 2011 03:06AM UTC by comment:6
keywords: | needsdocs |
---|
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/