Created
September 21, 2016 10:32
-
-
Save joviczarko/b4fd93e5631b42f9271c5366b0a7c8f6 to your computer and use it in GitHub Desktop.
Do something after scrolling certain amount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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