Created
March 30, 2015 20:44
-
-
Save TechRemarker/b9edc7fc0c04f5087f63 to your computer and use it in GitHub Desktop.
Add Class on Scroll
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
jQuery(document).ready(function($) { | |
$(window).on('scroll touchmove', function () { | |
$('.main-navigation').toggleClass('past-main', $(document).scrollTop() > 0); | |
}).scroll(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment