Not all developers know the marquee tag of HTML, that allows you to create a scrolling piece of text or image displayed that is shown horizontally or vertically on the DOM. Its functional, however this tag is obsolete so you should try to avoid using it. The most reliable alternative to this problem is to use plain JavaScript (or in this case a plugin).
In case you need to implement a marquee with a news ticker style, we have collected 5 of the best jQuery plugins that will help you to achieve your goal.
5. jQuery Ticker
jQuery Ticker is a lightweight jQuery plugin for animating a simple news ticker. Add an HTML tag for the ticker container (like a div
or a span
) with one unordered list containing the ticker items inside. Other content may be inside the ticker container as well. Ticker headlines (the li
tags) may contain the following basic HTML tags: <a>
, <b>
, <strong>
, <i>
, <em>
, <u>
, and <span>
:
<div class="ticker">
<strong>News:</strong>
<ul>
<li>Ticker item #1</li>
<li>Ticker item #2</li>
<li><em>Another</em> ticker item</li>
...
</ul>
</div>
And to initialize:
$('.ticker').ticker();
4. jQuery Easy Ticker
jQuery easy ticker is a news ticker like plugin, which scrolls the list infinitely. It is highly customizable, flexible with lot of features and works in all browsers. The main features of this plugin are:
- Two directions available (Up and down).
- Can be targeted on any template.
- Flexible API for extending to various applications.
- Supports 'easing' functions.
- Mouse pause feature available.
- The speed of the transition can be changed.
- Controls can be added inorder to Play/pause or move the list Up and down.
- Cross browser support.
- Light-weight (4 Kb - Full source / 2.7 Kb - Minified source).
3. jQuery News Ticker
An easy to use, slick and flexible news ticker in the style of the BBC News page ticker (http://news.bbc.co.uk). Recommended for jQuery 1.4.x or above only (A very early version with support for with jQuery 1.3.2 is available from the website, but is missing some features and is no longer supported). First, download the zip file containing the plugin and the example / documentation for the news ticker.
2. Marquee3000
Marquees is a super smooth and versatile javaScript plugin with no dependencies. The plugin is completely free. The main features of marquee3000 are:
- ~3kb minified with no dependencies
- Turn any element into a smooth-as-butter marquee
- Text, images++* it'll do it
- Style marquees as usual with CSS– get creative!
- Set speed and direction
- Have a ton without any slowdown
- Responsive!
1. jQuery Marquee
jQuery Marquee is a 5.51 KB (minified) jQuery plugin to scroll the text like the old traditional marquee. This plugin will detect if browser supports CSS3 animations than it will animate the element using CSS3 which will perform much better than animating using jQuery.
Honorable mentions
Simple Marquee
An easy to implement marquee JQuery plugin with pause on hover support.
If you know another open source Marquee plugin, please share it with the community in the comment box.