Side navigation
#5572 closed bug (worksforme)
Opened November 30, 2009 06:51PM UTC
Closed December 16, 2009 01:32AM UTC
Animate Callback triggering twice
Reported by: | thinkclay | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | animation, callback | Cc: | |
Blocked by: | Blocking: |
Description
$("html, body").animate({scrollLeft:$(id).offset().left}, 3000, "swing", function(){ alert("animation finished"); });
When scrolling a page horizontally, both html and body have to be targeted to support all browsers. However, this also causes the animation callback twice. Not sure what the best approach is but felt that this should possibly be analyzed and fixed.
Attachments (0)
Change History (1)
Changed December 16, 2009 01:32AM UTC by comment:1
resolution: | → worksforme |
---|---|
status: | new → closed |
Since you've selected two elements in the animation, it makes total sense for the callback to fire twice. If you want the callback code to only run once just look at
and only run it for either html or body.