Skip to content

Instantly share code, notes, and snippets.

@origamid
Created March 13, 2014 21:34
Show Gist options
  • Save origamid/9537452 to your computer and use it in GitHub Desktop.
Save origamid/9537452 to your computer and use it in GitHub Desktop.
Header Fixo Animado
$(document).scroll(function() {
if( $(this).scrollTop() > 100 ) {
$(".header-fixed").addClass("header-small");
} else if( $(this).scrollTop() < 100 ) {
$(".header-fixed").removeClass("header-small");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment