fullPage.js插件跳过了一部分

时间:2018-08-31 18:30:47

标签: javascript jquery fullpage.js

我正在使用fullPage.js插件进行滚动,由于某些原因,从顶部或最后一个部分滚动时,第二部分被跳过了。只有在我在下面添加JavaScript代码时才会发生这种情况,这是滚动导航栏所必需的。

这是我的JavaScript代码:

$(function() {
    $("#fullpage").fullpage({
      anchors: ["intro-video", "featured-videos", "share-tips"],
      menu: "#menu",
      navigation: true,
      navigationPosition: "right",
      navigationTooltips: ["Intro Video", "Featured Videos", "Share Tips"],
    });
  });

这是我的HTML代码:

<div class="main" id="fullpage">

<!--    first section-->
    <section id="intro" class="major section">
        <nav id="navigation" class="">
            <ul id="menu">
                <li data-menuanchor="featured-videos" class="see-more">
                    <a href="#featured-videos">See More Videos</a>
                </li>
                <li data-menuanchor="share-tips" class="share-tips">
                    <a href="#share-tips">Share Your Tips</a>
                </li>
                <li data-menuanchor="intro-video" class="home">
                    <a href="#intro-video">Home</a>
                </li>
            </ul>
        </nav>
        <!--more contetent here-->
    </section>

<!--    second section-->
    <section id="featured-videos-2" class="minor section">
        <!--content here-->
    </section>

<!--    third section-->
    <section id="share" class="major section">
        <!--content here-->
    </section>

</div>

0 个答案:

没有答案