PopoutSlider with Autoplay [closed]

6 days ago 9
ARTICLE AD BOX

I try to use the PopoutSlider by Nathan Taylor.

In the Javascript I need to replace the onClick function with a Autoplay function.

I tried it myself without success. Is there anybody out there that can help me. Code:

function goToSlide(number){ $('.slider__slide').removeClass('slider__slide--active'); $('.slider__slide[data-slide='+number+']').addClass('slider__slide--active'); } $('.slider__next, .go-to-next').on('click', function(){ var currentSlide = Number($('.slider__slide--active').data('slide')); var totalSlides = $('.slider__slide').length; currentSlide++ if (currentSlide > totalSlides){ currentSlide = 1; } goToSlide(currentSlide); })
Read Entire Article