为什么要自定义onLoad和onLeave事件, 而不是利用fullPage.js的onLeave和afterLoad回调函数呢
代码:
$('#h5').fullpage({
onLeave: function(index, nextIndex, direction) {
$(this).find('.component').fadeOut();
},
afterLoad: function(anchorLink, index) {
$(this).find('.component').fadeIn();
}
});