문제

I am using jquery cycle plugin with below settings.Photos sliding in given time out well without problem but if i click another tab of browser and wait 10 sn then back to slideshow's tab and i see that slideshow is stopped . It does not pass next photo. What can cause this problem ?

    var slideShow = $('.slideshow-container').cycle({ fx: 'fade', timeout: 3000, speed: 500, fastOnEvent: 1,
        skipInitializationCallbacks: true,
        pause: 1
    });

I am using jQuery 1.6.2 and cycle version 2.9995 (latest).

You can Test it on jsfiddle.net

도움이 되었습니까?

해결책

All right, I think I got it. It's working now, at least with the options specified by your code. I'm not sure (for I have not tested it) if my implementation will play along nicely with other options that can be passed to cycle plugin.

The reason why this problem has been occuring was that next iteration where transition suppose to occure was setup before completion of previous transition. In some cases, next transition was fired before the previous has finished, at the beginning of that new transition there's a check whenever there's already other animation going on - if so, the function would just return and stop (without setting up next iteration). After the ongoing animation was finished, the slideshow was stopped, because there was no next transition scheduled.

I've forked the cycle plugin on github and published my fix: https://github.com/WTK/cycle

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top