[英]Prevent from adding active class to section on fullpage.js
加載fullpage.js頁面的第一部分時,它將向該部分添加active
類。 問題在於類會在后台觸發動畫,因此用戶將看到完成的動畫。 如何防止fullpage.js向該部分添加active
類?
您可以為此使用fullpage.js事件回調函數,
onLeave: function(index, nextIndex, direction){},
afterLoad: function(anchorLink, index){},
afterRender: function(){},
afterResize: function(){},
afterResponsive: function(isResponsive){},
afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){},
onSlideLeave: function(anchorLink, index, slideIndex, direction, nextSlideIndex){}
請參閱此文檔https://github.com/alvarotrigo/fullPage.js/
離開第一張幻燈片時,將回調函數添加到onLeave:
以從該元素中刪除活動類,例如
$('.class').fullpage({
onLeave: function(index, nextIndex, direction){
// remove the active class here
}
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.