Created
December 25, 2017 17:28
-
-
Save elinwibe/4c1f6d33e40a603ffc6ded89a61ec3f0 to your computer and use it in GitHub Desktop.
Element fade in when not at top
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($(this).scrollTop() != 0) { | |
$('#').fadeIn("slow"); //If NOT at top/0px, # fades in | |
} else { | |
$('#').fadeOut("fast"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment