Last active
November 11, 2015 16:45
-
-
Save thadallender/e9a58129a82f362032ba to your computer and use it in GitHub Desktop.
Vanishing welcome message on scroll. Tutorial here: https://graphpaperpress.com/?p=74953
This file contains hidden or 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( $ ) { | |
| // This is where we apply opacity to the intro overlay | |
| $( window ).scroll( function() { | |
| // Hide the overlay if user has scrolled past 1px from top | |
| if ( $( window ).scrollTop() >= 1 ) { | |
| $( '.vanishing-message' ).removeClass('has-overlay'); | |
| $( '.vanishing-message .text' ).css( 'opacity', 0 ); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment