fullpage.js——回调函数

来源:互联网 发布:js将图片上传到服务器 编辑:程序博客网 时间:2024/05/28 06:08
 //动画回调函数 **afterLoad:**function(link,index){     //到达页面的函数                    if(index==1){         //判断到达的页面,index对应section                        $(".onec").find("h1").fadeIn(1000);   //.onec是自己取的类名                    }                    if(index==2){                        $(".twoc").find("h1").animate({bottom:"100px"},1000)                    }                },**onLeave:**function(index,direction){     //页面离开的函数                    if(index==1){                        $(".onec").find("h1").fadeOut(1000);                    }                    if(index==2){                        $(".twoc").find("h1").animate({bottom:"-100vh"},1000)                    }                }            })
原创粉丝点击