Archive for December, 2016

fullPage.js – always scroll from top within sections

Scroll long sections always from top.
This works only for section without slides.
Tested with fullPage 2.8.9.

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