Last active
June 21, 2018 14:54
fullPage.js fade effect for slides
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
var SCROLLING_SPEED = 700; | |
// fullPage.js settings for fading-in slides insead of scrolling them | |
$('#fullpage').fullpage({ | |
scrollingSpeed: SCROLLING_SPEED, | |
// Hide the slides container before the next slide loads | |
onSlideLeave: function(anchorLink, index, slideIndex, direction) { | |
$.fn.fullpage.setScrollingSpeed(0); | |
$('.fp-section').find('.fp-slidesContainer').hide(); | |
}, | |
// Display the slides container by fading it in after the next slide has been loaded. | |
afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex) { | |
$('.fp-section').find('.fp-slidesContainer').fadeIn(700); | |
$.fn.fullpage.setScrollingSpeed(SCROLLING_SPEED); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I hope you can help me a bit. I'm using the same plugin as you were and have a same problem. I need fade transition between slides. This solution is working pretty well, but for me the middle slide doesn't fade somehow: https://jsfiddle.net/b1r310t3/7/
Also do you think how can I do the same with the sections as well?
I know it's not your plugin, but maybe you can help.
Thanks!