-3
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.