jquery弹性动画未完成

发布于 2024-09-27 10:05:47 字数 204 浏览 1 评论 0原文

http://www.thebraproject.com/collection

如果向后滑动晾衣绳,则每三个项目就会停止运行,而不会完成弹性动画。谁能明白为什么会发生这种情况?

我正在使用 AnythingSlider for jQuery 来使其工作。

http://www.thebraproject.com/collection

If you slide the clothesline backwards every third item stops dead without completing the elastic animation. Can anyone see why that might be happening?

I'm using the AnythingSlider for jQuery to make it work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

潜移默化 2024-10-04 10:05:47

我认为问题可能在于,当您前进和后退时滑块计数的方式是认为这是滑块的开始而不是运行过渡。尝试更改第三种情况,

case 3:
 var previous_index = 2;
 var next_index = 1;
 break; 

如果更改 next_index 变量会发生什么?这能解决问题吗?

I think maybe the problem is that the way the slider counts when you go forward and backward it is thinking it is the beginning of the slider and not running the transition. Try changing your third case

case 3:
 var previous_index = 2;
 var next_index = 1;
 break; 

what happens if you change the next_index variable? Does that fix it?

赢得她心 2024-10-04 10:05:47

每次 AnythingSlider 被迫“旋转”其页面时,缓动就会中断。 (换句话说:只要移动到的项目是“li.cloned”,缓动就会被破坏。)

在我看来,这是 AnythingSlider 中的一个错误,我认为正在调用一些动画完成的回调无需等待动画实际完成。

我犹豫是否要进一步分析,因为当前站点使用的是 AnythingSlider 1.2 版本,最新版本是 v1.5.x。我会尝试升级,看看是否可以解决您的问题。

https://github.com/ProLoser/AnythingSlider/downloads

The easing breaks every time AnythingSlider is forced to "rotate" its pages. (Put another way: any time the item being moved to is a "li.cloned", the easing is broken.)

It looks to me like this is a bug within AnythingSlider, I think some of the animation-complete callbacks are being called without waiting for animation to actually complete.

I hesitate to analyze any further because the current site is using version 1.2 of AnythingSlider, latest version is v1.5.x. I would try upgrading and see if that fixes your problem.

https://github.com/ProLoser/AnythingSlider/downloads

酒中人 2024-10-04 10:05:47

我还注意到,任何在没有完成动画的情况下停止的项目都会继续以这种方式运行,即使下次向后滑动它们时它不是第三个项目。其他在最初向后滑动时完成动画的项目,即使它们是第三个项目,也会在下次向后滑动时完成其动画。因此,我认为,无论出现什么问题,当你第一次向后滑动时,就会出现问题。如果您还没有解决这个问题,希望这对您有所帮助。

I also noticed that any item that stopped without completing the animation continues to behave in that manner even if its not the third item the next time you slide them backwards. Other items that finished the animation when sliding backwards initially, complete their animation the next time you slide backwards even if they are the third item. So whatever is going wrong is going wrong the first time you slide backwards I think. Hope this helps if you haven't already fixed this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文