I wrote a simple script for moving the pictures one after another at a certain interval, but nothing happens when you click on the slideshow stop, the pictures move as before. Here is the code:
lightbox.on('click.slide', '#slideHandler', function(e){ if ($(this).hasClass('startSlide')) { $(this).attr('class', 'stopSlide'); var slideshow = setTimeout(function sshow(){ imgright($('.imgtarget'), $('.imgstart'), $('#numberPhoto')); setTimeout(sshow, 4000); }, 4000); } else if ($(this).hasClass('stopSlide')) { clearTimeout(slideshow); $(this).attr('class', 'startSlide'); } return false; });
lightbox.on
- zb '