fullPage.js的方法:

 1. moveSectionUp()

功能:向上滚动一页。

 2. moveSectionDown()

功能:向下滚动一页。

3. moveTo(section, slide)

功能:滚动到第几页的第几个幻灯片。 
注意:页面是从1开始,幻灯片是从0开始。

4. silentMoveTo(section, slide)

功能:滚动到第几页的第几个幻灯片,但是没有动画效果。

5. moveSlideRight()

功能:幻灯片向右滚动。

6. moveSlideLeft()

功能:幻灯片向左滚动。

7. setAutoScrolling(boolean)

功能:动态设置autoScrolling。

8. setLockAnchors(boolean)

功能:动态设置lockAnchors。

9. setRecordHistory(boolean)

功能:动态设置recordHistory。

10. setScrollomgSpeed(milliseconds)

功能:动态设置scrollingSpeed。

11. setAllowScrolling(boolean,[directions])

功能:添加或者删除鼠标滚轮/滑动控制。第一个参数true为启用,false为禁用。 
后面的参数为方向,取值包含all, up, down, left, right,可以使用多个,逗号隔开。

fullPage.js的回调函数:

 1. afterLoad(anchorLink, index)

功能:滚动到某一section,并且滚动结束后,会触发一次回调函数,函数接收anchorLink和index两个参数,anchorLink是锚链接的名称,index是序号,从1开始 计算。 
例如:

afterLoad:function(anchorLink, index){
console.log("anchorLink:"+anchorLink+"\t index:"+index);
},
  • 1
  • 2
  • 3
 2. onLeave(index, nextIndex,direction)

功能:在离开一个section时,会触发一次调回函数,接收index、nextIndex和direction 三个参数。 
index是离开页面的序列号,从1开始算起; 
nextIndex是滚动到目标页面的序列号,从1开始算起。 
direction是判断向上还是向下滚动,值为up或down。 
例如:

onLeave:function(index,nextIndex,direction){
console.log("index:"+index+" nextIndex:"+nextIndex+" direction:"+direction);
},
  • 1
  • 2
  • 3
 3. afterRender()

功能:页面结构生成后的回调函数,或者说是页面初始化完成后的回调函数。 
例子:

afterRender:function(){
console.log("afterRender");
},
  • 1
  • 2
  • 3
 4. afterResize()

功能:浏览器窗口尺寸改变后的回调函数。 
例子:

afterResize:function(){
console.log("afterResize"); },
  • 1
  • 2
 5. afterSlideLoad(anchorLink, index, slideAnchor, slideIndex)

功能:滚动到某一幻灯片后的回调函数,与afterLoad类似。slideAnchor、slideIndex起始值为0。 
例子:

afterSlideLoad:function(anchorLink, index, slideAnchor, slideIndex){
console.log("anchorLink:" + anchorLink +" index:" + index +" slideAnchor:" + slideAnchor +" slideIndex:" + slideIndex );
},
  • 1
  • 2
  • 3
 6. onSlideLeave(anchorLink, index, slideAnchor, direction, slideIndex)

功能:在离开一个slide时,会触发一次的回调函数,与onLeave类似。direction的值为left或者right。slideAnchor、slideIndex起始值为0。 
例子:

onSlideLeave:function(anchorLink, index, slideAnchor, direction, slideIndex){
console.log("anchorLink:" + anchorLink +" index:" + index +" slideAnchor:" + slideAnchor +" direction:" + direction +" slideIndex:" + slideIndex );
},

最新文章

  1. oracle DDL(数据定义语言)基本语句
  2. eclipse左边导航package explorer自动定位
  3. SSIS package 更新 variable
  4. 经典71道Android试题及答案
  5. 华东交通大学2016年ACM“双基”程序设计竞赛 1002
  6. AFNetworking教程
  7. IOS-开发日志-UIScrollView
  8. [ArcGIS所需的补丁]ArcGIS 10.2.2 for Desktop联系Oracle(2014年10上个月发布)数据库崩溃
  9. xmlplus 组件设计系列之五 - 选项卡
  10. Jenkins-FQA
  11. Docker(一):Docker安装
  12. querySelector与getElementBy的区别
  13. Gatling实战(一)
  14. 第一册:lesson thirty five。
  15. 使用Retrofit时常用到的注解
  16. GPS信号不足情况下,如何用GPRS模块根据基站进行定位
  17. ubuntu12下subversion 1.6升级为1.8版本
  18. iOS开发-UIView扩展CGRect
  19. Hadoop2.2.0 eclipse插件编译及Ecliipse配置说明(图文版)
  20. Mybatis之SessionFactory原理

热门文章

  1. MFC双缓冲
  2. 14 —— npm —— 基本使用 ——初始化项目
  3. C++ 编程学习(六) 函数
  4. Busybox文件系统的移植
  5. 18 react react-redux 的编写 TodoList
  6. swift中使用UIColllectionView实现横向轮播的一般方法
  7. 使用Spring Data Mongodb的MongoRepository类进行增删改查
  8. HALCON导出函数
  9. Notepad++配置
  10. openstack trove weekly meeting时间即将更改