I have coded a slide开发者_运维知识库r to my project but it fails on chrome and firefox5. Slider has a info bar and if page is in inactive tab, it queues the animation of infobar and when i return to the my page it repeats animation n times.
How can i fix that issue ? :(
I try: setTimeout but it couses a new bug that infobar never seems :S
The test link of my project is here : http://demo.cihanuygun.com/polo/
See this answer about how to detect the window losing and gaining focus and in your slidebox() function, don't queue up an animation if the window does not have focus.
精彩评论