全高滑块跳过一张幻灯片

Mar*_*ick 9 css jquery fullpage.js

我正在使用fullPage.js为几个全屏幻灯片创建一个完整的宽度和高度滑块.所以我的网站结构就像

section#f01
section#f02
section#f03.scrollfix
section#f04
Run Code Online (Sandbox Code Playgroud)

我想在浏览section#f03.scrollfix网站时跳过.用我的键盘和/或鼠标滚轮滚动.

Alv*_*aro 5

在线演示

如果你想在加载时删除它,那么afterRender就像我在这里一样使用回调:

$('#fullpage').fullpage({
    sectionsColor: ['yellow', 'orange', '#C0C0C0', '#ADD8E6'],

    afterRender: function () {
        removeSection2();
    }
});

function removeSection2() {
    // Move section 2 after the las section
    $('.fp-section:last').after($('#f02'));

    //removing the internal class `fp-section` so fullPage.js won't recognise it and won't be able to scroll to it.
    $('#f02').removeClass('fp-section');
}
Run Code Online (Sandbox Code Playgroud)

如果您想在任何其他时刻使用它,只需随时调用该功能removeSection2.

如果你想在某个时候恢复它,你可以使用另一个功能:

function restoreSection2() {
    // Move all next sections to before the active section
    $('#f01').after($('#f02'));
    $('#f02').addClass('fp-section');
}
Run Code Online (Sandbox Code Playgroud)