Skip to content

Instantly share code, notes, and snippets.

@chirag04
Created March 14, 2014 18:11
Show Gist options
  • Save chirag04/9553473 to your computer and use it in GitHub Desktop.
Save chirag04/9553473 to your computer and use it in GitHub Desktop.
bootstrap navbar trick
$(window).scroll(function() {
if ($(document).scrollTop() < 60) {
$("#navigation").removeClass("navbar-open").addClass("navbar-close");
}
else {
$("#navigation-top").removeClass("navbar-close").addClass("navbar-open");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment