ResponsiveSlides.js icon indicating copy to clipboard operation
ResponsiveSlides.js copied to clipboard

Remove long delay in first slide?

Open raeannewright opened this issue 12 years ago • 4 comments

Hi there,

I love this slider and it is working beautifully for my site! The only strange issue is when you land on my page, the initial slide holds for much longer than it should -- probably twice or three times the length of the others. But then the slideshow begins, and the slide length is correct, even when rotating back to the first slide.

I saw other posted issues asking how to achieve this effect. Somehow I've got it unintentionally! Any advice appreciated.

Cheers and thanks, Raeanne

raeannewright avatar Feb 14 '13 17:02 raeannewright

Do you have that page online? If you do, a link would help a lot :)

arielsalminen avatar Feb 14 '13 18:02 arielsalminen

Hi, thanks for the quick response! Yes, indeed, a link would be helpful: http://cmsstaging.vassar.edu/cmpu/web/

Out of curiosity, I asked a colleague about this issue and he suspected image load time might have something to do with it...

Thanks again!

raeannewright avatar Feb 14 '13 18:02 raeannewright

I also noticed this behaviour. First slide is displayed longer than other slides. Does anybody know how to fix this?

ghost avatar Feb 08 '14 08:02 ghost

Notices the same behaviour. Don't know if this issue was fixed by now. I solved it by rewriting the startCycle() function a little bit

      startCycle = function () {

        //Inner function. Code was previously within the rotate interval
        var startCycleInner = function () {

          // Clear the event queue
          $slide.stop(true, true);

          var idx = index + 1 < length ? index + 1 : 0;

          // Remove active state and set new if pager is set
          if (settings.pager || settings.manualControls) {
            selectTab(idx);
          }

          slideTo(idx);
        };

        // Hold a few moments
        setTimeout(function() {

            // Start first transition
            startCycleInner();

            // Then rotate
            rotate = setInterval(function () {
                startCycleInner();
            }, waitTime);
        }, (waitTime - fadeTime));

      };

xnikox avatar May 05 '15 09:05 xnikox