課程
/前端開發(fā)
/JavaScript
/FullPage.js全屏滾動插件
使用fullpage后,獲取不到滾動條滾動的高度怎么解決呢?
2016-06-27
源自:FullPage.js全屏滾動插件 2-5
正在回答
console.log("anchorLink"+anchorLink+"index"+index); 我打印的都是object 是什么原因?
把scrollOverflow設(shè)為true 滾動條就出來了
$('#dowebok').fullpage({
sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', '#f90'],
anchors:['page1','page2','page3','page4'],
afterLoad:function(anchorLink,index){ //頁面的錨鏈接,頁面序號.當(dāng)滾動完成后返回數(shù)據(jù)
console.log("anchorLink"+anchorLink+"index"+index);
},
onLeave:function(index,nextIndex,direction){ //滾動之前的頁面序號,滾動后的頁面序號,滾動的方向。滾動前先返回數(shù)據(jù)
console.log("index "+index+"nextIndex "+nextIndex+"direction "+direction);
afterRender:function(){ //頁面載入完成后返回,其他的回調(diào)方法全部在這個方法回調(diào)完成后回調(diào)
console.log("afterRender");
afterResize:function(){ //當(dāng)頁面尺寸被改變后調(diào)用此方法
console.log("afterResize");
afterSlideLoad:function(anchorLink,index,slideAnchor,slideIndex){
console.log("anchorLink "+anchorLink+"index "+index+"slideAnchor "+slideAnchor+"slideIndex "+slideIndex);
onSlideLeave:function(anchorLink,index,slideIndex,direction,nextSlideIndex){
console.log("anchorLink "+anchorLink+"index "+index+"slideIndex "+slideIndex+"direction "+direction+"nextSlideIndex "+nextSlideIndex);
}
});
可以使用fullpage提供的方法實現(xiàn)
舉報
基于jQuery的全屏滾動效果插件,讓翻頁顯得格外的高端大氣上檔次
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-05-29
console.log("anchorLink"+anchorLink+"index"+index); 我打印的都是object 是什么原因?
2017-08-12
把scrollOverflow設(shè)為true 滾動條就出來了
2016-06-29
$('#dowebok').fullpage({
sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', '#f90'],
anchors:['page1','page2','page3','page4'],
afterLoad:function(anchorLink,index){ //頁面的錨鏈接,頁面序號.當(dāng)滾動完成后返回數(shù)據(jù)
console.log("anchorLink"+anchorLink+"index"+index);
},
onLeave:function(index,nextIndex,direction){ //滾動之前的頁面序號,滾動后的頁面序號,滾動的方向。滾動前先返回數(shù)據(jù)
console.log("index "+index+"nextIndex "+nextIndex+"direction "+direction);
},
afterRender:function(){ //頁面載入完成后返回,其他的回調(diào)方法全部在這個方法回調(diào)完成后回調(diào)
console.log("afterRender");
},
afterResize:function(){ //當(dāng)頁面尺寸被改變后調(diào)用此方法
console.log("afterResize");
},
afterSlideLoad:function(anchorLink,index,slideAnchor,slideIndex){
console.log("anchorLink "+anchorLink+"index "+index+"slideAnchor "+slideAnchor+"slideIndex "+slideIndex);
},
onSlideLeave:function(anchorLink,index,slideIndex,direction,nextSlideIndex){
console.log("anchorLink "+anchorLink+"index "+index+"slideIndex "+slideIndex+"direction "+direction+"nextSlideIndex "+nextSlideIndex);
}
});
2016-06-29
可以使用fullpage提供的方法實現(xiàn)