简体   繁体   English

fullpage.js活动类显示两个半部分

[英]fullpage.js active class show two half sections

Hey i'm using the fullpage.js plugin and want my page to start at the last slide. 嘿,我正在使用fullpage.js插件,希望我的页面从上一张幻灯片开始。 The last slide have the class active, wich is suppose to load the side to a specific slide. 最后一张幻灯片的类处于活动状态,假定将侧面加载到特定的幻灯片上。 The result is that the page shows have of the active slide and half of the slide above. 结果是页面显示具有活动幻灯片和上面的一半幻灯片。

Is there anyone who knows what the problem is? 有谁知道问题出在哪里吗?

http://itu.dk/people/cnos/diam/Eksamensprojekt%20kopi/journey.html http://itu.dk/people/cnos/diam/Eksamensprojekt%20kopi/journey.html

You are initializing fullPage.js twice here ... 您在这里两次初始化fullPage.js ...

And you should be including the CSS styles before the javascript ones. 并且您应该在JavaScript样式之前添加CSS样式。

You should only have one initialization: 您应该只进行一次初始化:

//FULL PAGE CODE
$('#fullpage').fullpage({
    css3: true,
    navigation: true,
    navigationPosition: 'right',
    easing: "easeOutQuad",
    scrollOverflow: true,
    onLeave: slideLeave,
    paddingTop: '0px',
    verticalCentered: false,

    afterLoad: function(anchorLink, index){
        var loadedSection = $(this);
        $( "#ufoscroll" ).hide( 0 );
        $( "#ufopic" ).show( 0 );

        if(index == 9){
        $( "#makurtale" ).show( "" );
        }

        if(index == 10)
        $( ".solbillede" ).show( "" );
        $( "#ufoscroll" ).hide( 0 );
        $( "#ufopic" ).show( 0 );

    },

    onLeave: function(index, nextIndex, direction){
        var leavingSection = $(this);
        if(direction =='up'){
            $( "#ufoscroll" ).show( 0 );
            $( "#ufopic" ).hide( 0 );              
        }
    },
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM