Skip to content

Instantly share code, notes, and snippets.

@ti-ka
Created November 13, 2015 15:56
Show Gist options
  • Save ti-ka/c6274f8d849f0c9b4b1b to your computer and use it in GitHub Desktop.
Save ti-ka/c6274f8d849f0c9b4b1b to your computer and use it in GitHub Desktop.
$("body").on("click", "#categoryNav>li>a", function () {
var item = $(this).attr("href");
var scrollTop = $(item).offset().top;
window.scrollTo(0, scrollTop - 100);
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment