简体   繁体   中英

jquery elastic animation doesn't complete

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.

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM