多くの画像を含むスライダーショーに unslider を使用しています。
プラグインは既に正常に動作していますが、理由がわかりません。Im の遅延と速度のオプションが正しく機能しません。
バナー画像を 7 秒ごとに変更したいのですが、3 秒の遅延が必要です。そこで、速度を 7000 (ミリ秒) に設定し、遅延を 3000 に設定しました。しかし、うまくいきません。jQueryスクリプトで設定した速度と遅延が得られません。
ここで何が起こっているのかを理解するために、誰か助けてくれませんか?
私は私の例でこのフィドルを持っています: http://jsfiddle.net/bdmU4/3/
以下に、unslider プラグインを開始するための jQuery を示します。
$(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>