Last active
January 13, 2016 20:09
-
-
Save th0mk/75d060cc71830d727c44 to your computer and use it in GitHub Desktop.
Script that changes adds and removes a class when you scroll below 200 (this can be changed)
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
$(window).scroll(function() { | |
if ($(document).scrollTop() > 200) { | |
$('someID').addClass('someClass'); | |
} else { | |
$('someID').removeClass('someClass'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment