A lightweight (<4k), customizable news ticker plugin for jQuery. It uses hard-coded SVG control buttons so no extra images are needed. All you need is the plugin.
1.0
<script type="text/javascript" src="assets/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="assets/js/tickerme.min.js"></script>
You can give the wrapper any id
- in this case we're using ticker
.
<ul id="ticker">
<li>This is the first news story.</li>
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente, molestiae.</li>
<li>Another news story.</li>
<li>The final news story, with some more test text.</li>
</ul>
$(function(){
$('#ticker').tickerme();
});
You can edit the way TickerMePink wraps the ticker: either create a definition in your CSS file for #ticker_container
, or edit the one provided in the example styles.css
:
#ticker_container {
padding:10px;
border:1px solid #676767;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
overflow: auto;
}
The speed each story will fade in and out (milliseconds).
Default: 500
The length of time a story is on the screen (milliseconds).
Default: 3000
If true
, the ticker will automatically stop when the previous or next button is clicked.
Default: true
The colour of the play, pause, previous and next controls.
Default: #333333
The colour of the control buttons on rollover.
Default: #666666
$(function(){
$('#news_stories').tickerme({
fade_speed: 900,
auto_stop: false,
control_rollover: '#FF0000'
});
});