fullPage.js – always scroll from top within sections

Scroll long sections always from top.
This works only for section without slides.

$('#fullpage').fullpage({
  scrollOverflow: true,
  onLeave: function(index, nextIndex, direction){
    $('.fp-scrollable').each(function() {
      var iScrollInstance = $(this).data('iscrollInstance');
      iScrollInstance.scrollTo(0,0, 2000);
    });
  }
});

Leave a Reply

Your email address will not be published. Required fields are marked *

× 3 = 12