News ticker (BBC style)
News ticker in the style of that used on the BBC news site.
Sample usage:
$(document).ready(function() {
var options = {
newsList: "#news",
startDelay: 10,
placeHolder1: " []"
}
$().newsTicker(options);
});
for markup as follows:
<ul id="news">
<li><a href="http://www.makemineatriple.com">MakeMineATriple.com</a></li>
<li><a href="http://www.jquery.com">jQuery</a></li>
</ul>
Underline text decoration on the (un-hovered) link is not recommended, for obvious reasons! :-)
The full set of options is:
- newsList: "#news" // assumes unordered list; specify the ul holding the news items
- tickerRate: 80 // time gap between display of each letter (ms)
- startDelay: 100 // delay before first run of the ticker (ms)
- loopDelay: 3000 // time for which full text of each item is shown at end of print-out (ms)
- placeHolder1: " |" // character placeholder shown on even loops
- placeHolder2: "_" // character placeholder shown on odd loops
评论