[英]jQuery Galleria plug-in: Make auto-play?
I am using this jQuery plugin 我正在使用这个jQuery插件
It is very nice, but I can't seem to figure out how to get it to auto-play. 很好,但我似乎无法弄清楚如何使其自动播放。 (automatically transition to the next image at an interval)
(每隔一段时间自动过渡到下一张图像)
Has anyone else gotten this to do that? 还有其他人这样做吗?
$('#galleria').galleria({
extend: function() {
this.play(4000); // will advance every 4th second
}
});
Actually the new version of galleria has an option for autoplay. 实际上,新版本的Galleria具有自动播放选项。 looks like this: (where
.test
is the name of the div layer containing your images) 看起来像这样:(其中
.test
是包含图像的div层的名称)
<script>
// Load theme
Galleria.loadTheme('../src/themes/classic/galleria.classic.js');
$('.test').galleria({
autoplay: 1000
});
</script>
In my experience, it doesn't have that option. 以我的经验,它没有那种选择。 You'd have to hack it to add that.
您必须对其进行修改以添加它。
You might want to consider using another slider plugin: Easy Slider , Galleriffic , Pikachoose 您可能要考虑使用另一个滑块插件: Easy Slider , Galleriffic , Pikachoose
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.