Ninja Slider / Posts /

How to make the slider stop at the last slide

0
Can anyone tell me how to make the responsive slider stop at the last slide?
Dragen  3 years ago   viewed: 7426    

3 Answers

0

We can use the build-in before or after event handler and the toggle function to accomplish the task. Suppose you have 4 slides in the slider:

In the nsOptions of the ninja-slider.js, you will find the before variable:

var nsOptions = { ...... before: null, ...... }
You can set it to:
var nsOptions = { ...... before: function (currentIdx, nextIdx, manual) { if (nextIdx == 3) nslider.toggle(); }, ...... }
Note: the index number is zero-based.
Milo   3 years ago
0
this will make the slide stop, but how to continue from slide 0 while reaching the last slide; instead of showing all slides navigation to reach at slide 0. (in simple can the slider continues slides from slide 0 when it reach last slide instead of showing the whole slides in reverse mode?)
Shahid
  3 years ago
1
Yes it is the continuous sliding without reversing back since the version 2015.10.26.
Milo   3 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: