문제

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