Created
April 11, 2018 12:19
-
-
Save alvarotrigo/abd4a8b21ffe616520614575491fab24 to your computer and use it in GitHub Desktop.
tumblr effects using fullpage.js callbacks
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
onLeave: function(index, nextIndex, direction){ | |
if(nextIndex === 2){ | |
animationCont++; | |
//forcing the gift to start again | |
$('.section-2-animation') | |
.css('background-image', 'url(animation3.gif?v='+animationCont+')'); | |
} | |
}, | |
afterLoad: function(anchorLink, index){ | |
$('.blogs-graphic').toggleClass('active', (index === 3)); | |
}, | |
afterRender: function(){ | |
//forcing visual render of the element to we can apply the transition | |
$('.section-1-whatIs')[0].clientHeight; | |
$('.section-1-bg')[0].clientHeight; | |
$('.section-1-bg, .section-1-whatIs, .section-1-content').addClass('active'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment