one year ago
You can implement this by using the slider's built-in functions and event handlers that are listed in Demo 4
Image Slider with Navigation Buttons.
Suppose you have 5 slides in total. Your last frame will be index=4. Add the following event handler to your page inside the script tag: <script> ... </script>
function beforeSlideChange(args) {
//args[0]-next slide index, args[1]-next image,
//args[2]-next caption, args[3]-next effect
if(args[0]==4) imageSlider.changeOptions({ autoAdvance: false });
}
Note:
- The afterSlideChange event handler is only available for licensed slider.
-
You can also use afterSlideChange handler. But you need to use index 3 instead.
function afterSlideChange(args) {
//args[0]-currentSlide index, args[1]-currentImage
if(args[0]==3) imageSlider.changeOptions({ autoAdvance: false });
}