一個jQuery的即時新聞行情展示插件jQuery News Ticker
今天分享一個新聞行情的jQUery插件,可以幫助大家使用比較小的頁面區域來展示最新最重要的信息。

jQuery news ticker是一個非常方便的jQuery插件,能夠快速讓你生成這樣的一個新聞行情效果。
它能夠通過列表,HTML甚至是RSS(只能加載本站的RSS feed)來生成新聞內容,并且支持前后播放和停止。這個插件支持一系列的自定義選項,例如:
- 播放速度
- 播放效果
- 播放方向
- 顯示時間
代碼開發簡單高效。
首先引入jQuery news ticker類庫及其jQuery類庫:
<link href="css/ticker-style.css" rel="stylesheet" type="text/css" />
<script src="jquery.ticker.js" type="text/javascript"></script>
HTML代碼:
<div id="ticker-wrapper" class="no-js">
<ul id="js-news" class="js-hidden">
<li class="news-item"><a href="#">This is the 1st latest news item.</a></li>
<li class="news-item"><a href="#">This is the 2nd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 3rd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 4th latest news item.</a></li>
</ul>
</div>
javascript:
<script type="text/javascript">
$(function () {
$('#js-news').ticker();
});
</script>
歡迎訪問GBin1.com


浙公網安備 33010602011771號