jquery-backstretch / jquery-backstretch

Backstretch is a simple jQuery plugin that allows you to add a dynamically-resized, slideshow-capable background image to any page or element. The image will stretch to fit the page/element, and will automatically resize as the window/element size changes.
http://www.jquery-backstretch.com
MIT License
3.91k stars 912 forks source link

stop the slideshow #473

Open ilgio opened 6 years ago

ilgio commented 6 years ago

Hi How do I do to stop the slideshow when show the last image?

marcoribi commented 6 years ago

$(window).on 'backstretch.show', (e, instance) -> if instance.index == instance.images.length - 1 instance.pause()