apamphilon

Navigate to another page and scroll to anchor

<a href="http://www.apamphilon.com/page/!#/page-anchor-id"></a>
if (window.location.hash.length > 0 && $(window.location.hash.replace('!/', '')).length) {
  $('html, body').stop().animate({
    scrollTop: $(window.location.hash.replace('!/', '')).offset().top
  }, 1000);
}

Credit: Michael Smyth


Comments: