Last active
December 17, 2015 19:39
-
-
Save Takaya213/5662331 to your computer and use it in GitHub Desktop.
Fixed the header/nav to the top of the page in a slightly different style via a class.
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 scrolled_menu() { | |
if ($(window).scrollTop() > $('header').height()) { | |
$('header').addClass('fixed_type'); | |
$('html').addClass('fixed_type_html'); | |
} else { | |
$('header').removeClass('fixed_type'); | |
$('html').removeClass('fixed_type_html'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment