Am looking for a way to animate the scrollbar only when moving between neighbouring sections. Scrollify gives you the move
and instantMove
methods which does that but I need help with the logic of working out whether the section am about to move to is a neighbouring or non-neighbouring section.
Is there way to pass in additional info into the afterRender
method or a suggestions to achieve my goal?
afterRender: function() {
$(".pagination a").on("click", function() {
$.scrollify.move($(this).attr("href"));
});
}