1
我正在使用JCarouselLite(http://www.gmarwaha.com/blog/2007/08/09/jcarousel-lite-a-jquery-plugin/)生成垂直滾動「新聞動態「感謝式的旋轉木馬,一切都很完美,但我想隨機化顯示列表項目的順序。我試圖使用以下,但它不工作:jCarouselLite隨機啓動命令
if(o.random){var randomStart = Math.floor(Math.random()*tl+1);curr = randomStart;}
然後將「random:true」添加到選項。
有人能幫我解決這個問題嗎? 我的腳本是:
<script type="text/javascript">
$(document).ready(function(){
$(".ticker").jCarouselLite({
auto: 10000,
vertical: true,
random: true,
visible: 1
});
});
</script>