為什么我這里寫的和老師一樣,第一屏加載之后沒有效果,第四屏滾動不了。第二屏和第三屏是好的,第一屏返回過去也是正常的
$(document).ready(function(){
? ?$("#fullpage").fullpage({
? ? ? ?verticalCentered:false,
? ? ? ?anchors:['page1','page2','page3','page4'],
? ? ? ?navigation:true,
? ? ? ?navigationTooltips:['它,終于來了。','真正與你貼近的個人設(shè)備','非同一般的精準計時','在三個特點鮮明的系列中找到你的風(fēng)格'],
? ? ? ?afterLoad:function(link,index){
? ? ? ? ? ?switch(index){
? ? ? ? ? ? ? ?case 1:
? ? ? ? ? ? ? ? ? ? ? ?move('.section1 h1').scale(1.5).end();
? ? ? ? ? ? ? ? ? ? ? ?move('.section1 p').set('margin-top','5%').end();
? ? ? ? ? ? ? ? ? ? ? ?console.log(move('.section1 p').set('margin-top','5%').end());
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 2:
? ? ? ? ? ? ? ? ? ? ? ?move('.section2 h1').scale(0.7).end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 3:
? ? ? ? ? ? ? ? ? ?move('.section3 h1').set('margin-left','20%').end();
? ? ? ? ? ? ? ? ? ?move('.section3 p').set('margin-left','20%').end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 4:
? ? ? ? ? ? ? ? ? ? ? ?move('.section4 img.primary').rotate(360).end(function(){
? ? ? ? ? ? ? ? ? ? ? ? ? ?move('.section4 img.sport').rotate(360).end(function(){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?move('.section4 img.edition').rotate(360).end(function(){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?move('.section4 h4.primary').scale(1.3).end(function(){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?move('.section4 h4.sport').scale(1.3).end(function(){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?move('.section4 h4.edition').scale(1.3).end();
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? ? ? ? ?});
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?default:
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ?}
? ? ? ?},
? ? ? ?onLeave:function(link,index){
? ? ? ? ? ?switch(index){
? ? ? ? ? ? ? ?case 1:
? ? ? ? ? ? ? ? ? ?move('.section1 h1').scale(1).end();
? ? ? ? ? ? ? ? ? ?move('.section1 p').set('margin-top','800px').end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 2:
? ? ? ? ? ? ? ? ? ?move('.section2 h1').scale(1).end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 3:
? ? ? ? ? ? ? ? ? ?move('.section3 h1').set('margin-left','-1500px').end();
? ? ? ? ? ? ? ? ? ?move('.section3 p').set('margin-left','1500px').end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?case 4:
? ? ? ? ? ? ? ? ? ?move('.section4 img.primary').rotate(-360).end();
? ? ? ? ? ? ? ? ? ?move('.section4 img.sport').rotate(-360).end();
? ? ? ? ? ? ? ? ? ?move('.section4 img.edition').rotate(-360).end();
? ? ? ? ? ? ? ? ? ?move('.section4 h4.primary').scale(1).end();
? ? ? ? ? ? ? ? ? ?move('.section4 h4.sport').scale(1).end();
? ? ? ? ? ? ? ? ? ?move('.section4 h4.edition').scale(1).end();
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ? ? ?default:
? ? ? ? ? ? ? ? ? ?break;
? ? ? ? ? ?}
? ? ? ?},
? ? ? ?afterRender:function(){
? ? ? ?}
? ?});
});
2017-02-13
我也是這樣,你解決了 么 ?哥們
2016-01-20
插件庫的引入順序也和老師一樣?