所以我想要一个固定在窗口底部的向下箭头,向下滚动到每个部分。所以我点击它一次,它会把我向下滚动到第一节,我再次点击它,它会带我进入下一节,以此类推。我如何用fullPage.js实现这一点?
<nav>
<a>this is the arrow</a>
</nav>
<section id="one">
<h1>ONE</h1>
</section>
<section id="two">
<h1>TWO</h1>
</section>
<section id="three">
<h1>THREE</h1>
</section>
<section id="four">
<h1>FOUR</h1>
</section>
<section id="five">
<h1>FIVE</h1>
</section>
在使用fullPage.js时,需要使用fullPage.js函数,如moveSectioDown
:
$('.arrow').on('click', fullpage_api.moveSectionDown);
示例:
https://jsfiddle.net/zyxhwbrc/