Skip to content

Instantly share code, notes, and snippets.

@joviczarko
Created September 21, 2016 10:32
Show Gist options
  • Save joviczarko/b4fd93e5631b42f9271c5366b0a7c8f6 to your computer and use it in GitHub Desktop.
Save joviczarko/b4fd93e5631b42f9271c5366b0a7c8f6 to your computer and use it in GitHub Desktop.
Do something after scrolling certain amount
function home_navbar_toggle() {
if ($(window).scrollTop() > 100) {
$('nav.navbar-home').addClass('nav-scrolled');
}
else {
$('nav.navbar-home').removeClass('nav-scrolled');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment