Question

I'm using the fullpage.js plugin.

I have 5 sections underneath with each 10 slides horizontally. I wonder how I can jump to the next section once I've reached the 10th slide of the section.

onSlideLeave: function( anchorLink, index, slideIndex, direction) {
            if ( slideIndex === 10 ) { 
                //$.fn.fullpage.moveSectionDown();
            }
        }

So again, when I'm scrolling horizontally through my slides and I reach the last one, I want to jump to the first on the next section.

Kind Regards, Sepp88

Was it helpful?

Solution

As pointed in the plugin documentation:

slideIndex: index of the slide. Starting from 0.

Try this instead:

onSlideLeave: function (anchorLink, index, slideIndex, direction) {
    if (slideIndex === 9) {
        $.fn.fullpage.moveSectionDown();
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top