fullPage.js 滚动跳过幻灯片
fullPage.js scroll Skipping Slides
我正在使用 fullPage.js,并且 运行 遇到了顶部导航的问题。我有下面的代码可以工作,但是当使用触控板滚动时会跳过幻灯片 2-3,但是使用箭头键会在向下的过程中跳过 2 个,在向上的过程中跳过 3 个。谢谢
<div id="fullpage">
<div class="section this-is-home"data-anchor="firstPage">
<div class="slide-one-container">
<h4>TESTING</h4>
<p>content</p>
</div>
</div>
<div class="section this-is-jam" data-anchor="secondPage">Test2</div>
<div class="section" data-anchor="thirdPage">Test4</div>
<div class="section" data-anchor="fourthPage"></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage({
//Navigation
anchors: ['firstPage', 'secondPage', 'thirdPage', 'fourthPage'],
menu: '#myMenu'
});
});
</script>
确保不要多次初始化插件。 (这是使用 ajax 技术(例如 Rails 框架使用的技术)的人中非常常见的错误)
您正在调用 fullPage.js 两次...在 main.js 和 HTML 文件中。
我正在使用 fullPage.js,并且 运行 遇到了顶部导航的问题。我有下面的代码可以工作,但是当使用触控板滚动时会跳过幻灯片 2-3,但是使用箭头键会在向下的过程中跳过 2 个,在向上的过程中跳过 3 个。谢谢
<div id="fullpage">
<div class="section this-is-home"data-anchor="firstPage">
<div class="slide-one-container">
<h4>TESTING</h4>
<p>content</p>
</div>
</div>
<div class="section this-is-jam" data-anchor="secondPage">Test2</div>
<div class="section" data-anchor="thirdPage">Test4</div>
<div class="section" data-anchor="fourthPage"></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage({
//Navigation
anchors: ['firstPage', 'secondPage', 'thirdPage', 'fourthPage'],
menu: '#myMenu'
});
});
</script>
确保不要多次初始化插件。 (这是使用 ajax 技术(例如 Rails 框架使用的技术)的人中非常常见的错误)
您正在调用 fullPage.js 两次...在 main.js 和 HTML 文件中。