Skip to content

Instantly share code, notes, and snippets.

@alvarotrigo
Created April 11, 2018 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvarotrigo/abd4a8b21ffe616520614575491fab24 to your computer and use it in GitHub Desktop.
Save alvarotrigo/abd4a8b21ffe616520614575491fab24 to your computer and use it in GitHub Desktop.
tumblr effects using fullpage.js callbacks
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