当我更改浏览器选项卡时,Jquery Animate停止

我的投资组合中有一个疯狂的问题: httpheric http://hericdk.com

我用jquery制作了一个简单的动画,一个太空飞船的动画,然后看起来我的作品,这个想法很好,每个人都喜欢,但问题是,由于一些奇怪的原因,当我点击查看我的项目和船开始飞,如果我更改浏览器选项卡然后返回,所有背景动画正常工作..但船的动画仍然等待动画的下一个动作,直到我返回到我的投资组合的选项卡。

我会把太空船动画的代码放在这里,大家都明白了。

$('#spaceship a').click(function(){ $('#spaceship').spState(2).sprite({fps: 9, no_of_frames: 12}); $('#space').stop().delay(3000).animate({'top':'0px'},9000,'easeInOutQuad'); $('#spaceship').animate({'top':'150px','left':'55%'},3000,'easeInOutExpo').delay(200) .animate({'top':'350px','left':'65%'},2000,'easeInOutExpo').delay(100) .animate({'top':'-400px','left':'65%'},1300,'easeInBack').delay(100) .animate({'top':'-400px','left':'88%'},300,'easeInBack').delay(3000) .animate({'top':$(window).height()-305+'px','left':'88%'},4000,'easeOutQuad',function(){ $('#spaceship').spState(1).spStop(true); });// spaceship launch return false; }); //spaceship animation