Created
September 21, 2017 15:24
-
-
Save damiencarbery/cb82df65213f5b942d6e36a2767b0cb2 to your computer and use it in GitHub Desktop.
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
<?php | |
// Use scrollreveal from https://github.com/jlmakes/scrollreveal | |
add_action( 'wp_footer', 'afp_scrollreveal_init' ); | |
function afp_scrollreveal_init() { | |
?> | |
<style> | |
.home .widget-wrap { visibility: visible; } | |
.site-inner .widget-wrap, .entry-content { visibility: hidden; } | |
</style> | |
<script> | |
window.sr = ScrollReveal( { origin: 'left', duration: 500, viewOffset: { top: 70, right: 0, bottom: 0, left: 0 } } ); | |
//sr.reveal('.textwidget'); | |
sr.reveal('.site-inner .widget-wrap'); | |
sr.reveal('.entry-content', { viewFactor: 0.01 } ); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment