MehryarS MehryarS - 5 months ago 102
Javascript Question

Fade transition in fullpage.js

I want to use fullpage for makeing pesonal site.How can i replace fade transition instead of slide effect for changing between to section?

Fullpage.js demo: http://alvarotrigo.com/fullPage

Answer

you have to override the fullpage transitions with below css, Let me know if works

.fullpage-wrapper {
width: 100%!important;
transform: none!important;
}

.fp-section {
width: 100%!important;
position: absolute;
left: 0;
top: 0;
visibility: hidden;
opacity: 0;
z-index: 0;
transition: all .7s ease-in-out;
}

.fp-section.active {
visibility: visible;
opacity: 1;
z-index: 1;
}

Update To add a callback to your css transition you have to bind an event to parent section like

$("yourSection").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',   
function(e) {

// code to execute after transition ends

});
Comments