Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Class on Scroll
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
You can’t perform that action at this time.