Вопрос

In this link

The autoplay skips the last slide. Also when clicked on last slide, autoplay stops and doesn't continue to the first.

Is it possible while autoplay, slide remains in the box and scrolls automatically. As of now the slide disappears in the scroll after 5th slide. Can we make the current slide always visible in the box?

Please help.

Это было полезно?

Решение

in your code: instead of i++, change it with the current index of the cn_item with selected class. it should look like this:

function next() {
    i = $('.cn_item').index($('.selected')) + 1;
    if(i== $('.cn_item.selected').parent().children().length){      
      x=1;

that should fix everything.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top