LouisWhit
4/25/2018 - 8:42 PM

Autoscroll to top of page before changing pages

This will force the site to scroll to the top of the page when a link is clicked. It prevents some strange queuing / flash of unstyled contect etc issues from being noticible in specific situations.

$(window).on('beforeunload', function() {
      $("body").fadeOut(1000);
        $(window).scrollTop(0);
});