自动播放fullpage.js中的幻灯片 [英] Autoplay for slides in fullpage.js

查看:283
本文介绍了自动播放fullpage.js中的幻灯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此代码.

$('#fullpage').fullpage({   
    anchors: ['home', 'about', 'contact'],
    afterRender: function () {
        setInterval(function () {
            $.fn.fullpage.moveSlideRight();
        }, 2000);
    }
});

默认情况下,幻灯片从左向右移动.我的问题:当我们最后一张幻灯片时-幻灯片的动画是从右到左,通过其他幻灯片进行的.默认情况下,我如何实现从最后一张幻灯片到第一张幻灯片的动画(从左到右)动画?

By default slides move from left to right. My problem: when we come to last slide - animate of slides is happening from right to left, through other slides. How can i implement animate slides from last slide to first by default animate (from left to right)?

对于垂直滚动,它已经完成了.如果我们写continuousVertical: true,则会得到此调查.

For vertical scrolling it have already done. If we write continuousVertical: true will get this rusult.

推荐答案

fullPage github项目上有一个问题,我认为这是您正在尝试做的事情:

There is an issue on the fullPage github project which I think is talking about what you're trying to do: https://github.com/alvarotrigo/fullPage.js/issues/124

插件作者说他将不包括该功能,但后来说您可以与他联系以获取自定义插件的帮助.

The plugin author says he will not include the feature but later says you can contact him for help customising the plugin.

还有其他人的评论,您可以尝试以下解决方法:

There is also a comment from someone with a workaround you could try:

  1. 滚动到最后一张幻灯片时,启动setTimeout()作为显示时间,然后淡出"所有幻灯片.
  2. 滚动到第一张幻灯片时,启动setTimeout()进行拉回"操作,然后淡入"所有幻灯片.

这篇关于自动播放fullpage.js中的幻灯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆