我正在使用 Orbit 滑块,并希望从我的图像集合中随机选择显示的第一张图像,而不是代码中的指定顺序。
下面是滑块的链接和我的代码。http://zurb.com/playground/orbit-jquery-image-slider
jQuery
$(window).load(function () {
$('#featured').orbit();
});
HTML
<div id="featured">
<a href="1.php" data-caption="#htmlCaption1" target="_parent">
<img src="/images/image1.jpg" border="0" />
</a>
<a href="2.php" data-caption="#htmlCaption2" target="_parent">
<img src="/images/image1.jpg" border="0" />
</a>
<a href="3.php" data-caption="#htmlCaption3" target="_parent">
<img src="/images/image1.jpg" border="0"/>
</a>
</div>
<span class="orbit-caption" id="htmlCaption1"> Text here.</span>
<span class="orbit-caption" id="htmlCaption2"> Text here.</span>
<span class="orbit-caption" id="htmlCaption3"> Text here.</span>