0

我正在使用两个著名的插件wow.min.jsjquery.fullpage.js但是当我在同一页面上同时使用它们时,其中一个不起作用,请帮助我。我正在使用这两个脚本来调用它们。

<script type="text/javascript">
    $(document).ready(function() {
        $('#fullpage').fullpage({
            anchors: ['firstPage', 'secondPage', '3rdPage'],
            sectionsColor: ['#97cbd6', '#40434b'],
            navigation: true,
            navigationPosition: 'right',
            navigationTooltips: ['First page', 'Second page', 'Third and last page']
        });
    });
</script>




  <script>
        new WOW().init();
    </script>
4

1 回答 1

1

您只需要阅读fullPage.js 常见问题解答

Parallax以及许多其他依赖于网站滚动的插件,都会监听 javascript 的 scrollTop 属性。fullPage.js 实际上并不滚动站点,但它会更改站点的 top 或 translate3d 属性。仅当使用 fullPage.js 选项 scrollBar:true 或 autoScrolling:false 时,它​​才会真正以 scrollTop 属性可访问的方式滚动站点。

所以......只需使用scrollBar:true. 或者使用 fullpage.js 回调添加或删除类来创建动画,就像在fullPage.js 的示例文件夹中提供的Apple iPhone 5C 演示中一样。

于 2015-06-19T13:19:54.280 回答