diff --git a/core/jquery.snapscroll.js b/core/jquery.snapscroll.js index 94d7a6f..ff69173 100644 --- a/core/jquery.snapscroll.js +++ b/core/jquery.snapscroll.js @@ -36,7 +36,12 @@ if ($child) { clearTimeout(timer); timer = setTimeout(function() { - $(window).scrollTo($child, scroll_speed); + $(window).trigger('snapscrollBefore', $child).scrollTo($child, { + 'duration': scroll_speed, + 'onAfter': function() { + $(window).trigger('snapscrollAfter', $child); + } + }); $child.siblings(".ss-active").removeClass("ss-active"); $child.addClass("ss-active"); autoscrolling = true;