首页 > jquery.fullpage.js中的哪个变量是等同于zepto.fullpage.js中的.cur

jquery.fullpage.js中的哪个变量是等同于zepto.fullpage.js中的.cur

之前在移动端用zepto.fullpage.js实现全屏滚动效果,用jquery.fullpage.js中哪个变量可以获取当前屏的索引值呢?


$(function(){
    $('#dowebok').fullpage({
        sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', '#f90'],
        afterLoad: function(anchorLink, index){
            if(index == 2){
                $('.section2').find('p').delay(500).animate({
                    left: '0'
                }, 1500, 'easeOutExpo');
            }
            if(index == 3){
                $('.section3').find('p').delay(500).animate({
                    bottom: '0'
                }, 1500, 'easeOutExpo');
            }
            if(index == 4){
                $('.section4').find('p').fadeIn(2000);
            }
        },
        onLeave: function(index, direction){
            if(index == '2'){
                $('.section2').find('p').delay(500).animate({
                    left: '-120%'
                }, 1500, 'easeOutExpo');
            }
            if(index == '3'){
                $('.section3').find('p').delay(500).animate({
                    bottom: '-120%'
                }, 1500, 'easeOutExpo');
            }
            if(index == '4'){
                $('.section4').find('p').fadeOut(2000);
            }
        }
    });
});
【热门文章】
【热门文章】