【发布时间】:2014-09-27 03:21:06
【问题描述】:
我正在使用 unslider 来显示包含许多图像的滑块。
我已经有插件工作正常,但是,我不明白为什么,我的延迟和速度选项不能正常工作。
我希望我的横幅图片每 7 秒更改一次,并且我希望延迟 3 秒。所以我将速度设置为 7000(毫秒)并延迟 3000。但不起作用。我没有得到我在 jQuery 脚本中设置的速度和延迟。
有人可以帮助我了解这里发生的事情吗?
我的例子有这个问题:http://jsfiddle.net/bdmU4/3/
下面是我的 jQuery 启动 unslider 插件:
$(function (){
$('.banner').unslider({
speed: 3000, // The speed to animate each slide (in milliseconds)
delay: 7000, // The delay between slide animations (in milliseconds)
complete: function() {}, // A function that gets called after every slide animation
keys: true, // Enable keyboard (left, right) arrow shortcuts
dots: true, // Display dot navigation
fluid: false // Support responsive design. May break non-responsive designs
});
这里有我的 html:
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://unslider.com/unslider.min.js"></script>
<section id="banner-container">
<div class="banner">
<ul>
<li style="background-color:blue; height:200px; "></li>
<li style="background-color:red; height:200px; "></li>
<li style="background-color:yellow; height:200px; "></li>
<li style="background-color:green; height:200px; "></li>
</ul>
</div>
<a href="#" class="unslider-arrow prev">Previous Slide</a>
<a href="#" class="unslider-arrow next">Next slide</a>
</section>
【问题讨论】:
标签: jquery jquery-plugins slider unslider