fullPage.js 插件中的幻灯片自动播放
Autoplay for slides in the fullPage.js plugin
如果使用 fullPage.js 插件,如何实现幻灯片的自动播放?
<div id="fullpage">
<div class="section">
<div class="slide"> Slide 1 </div>
<div class="slide"> Slide 2 </div>
<div class="slide"> Slide 3 </div>
</div>
<div class="section">Some section</div>
<div class="section">Some section</div>
打开 Google 并输入 "autoplay fullpage.js"。
点击 the first result 并按照说明操作:
$(document).ready(function () {
$('#fullpage').fullpage({
afterRender: function () {
setInterval(function () {
$.fn.fullpage.moveSlideRight();
}, 1000);
}
});
});
如果使用 fullPage.js 插件,如何实现幻灯片的自动播放?
<div id="fullpage">
<div class="section">
<div class="slide"> Slide 1 </div>
<div class="slide"> Slide 2 </div>
<div class="slide"> Slide 3 </div>
</div>
<div class="section">Some section</div>
<div class="section">Some section</div>
打开 Google 并输入 "autoplay fullpage.js"。 点击 the first result 并按照说明操作:
$(document).ready(function () {
$('#fullpage').fullpage({
afterRender: function () {
setInterval(function () {
$.fn.fullpage.moveSlideRight();
}, 1000);
}
});
});