1. Home
  2. Computing & Technology
  3. JavaScript

Cross Browser Ticker/Marquee

2a. Obtain the Right to Left Script

More of this Feature

Introduction LtoR Script Customize it

To add my simple ticker/marquee script to your web page you first need to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called ticker.js. This version scrolls Right to Left (the appropriate direction for languages that read left to right).

You next attach the script into your web page that you wish to display your scrolling text on by adding the following code into the head section of your page.

<script type="text/javascript" src="ticker.js">
</script>

You also need to define where the ticker/marquee is to appear in your page by adding the following code at that point in the body of your page:

<div id="ticker"></div>

Now all that remains is to customize the script to display the scrolling text that you want in the way that you want it.

Sample Page | RtoL Script | LtoR Script | Customize your Script
Explore JavaScript
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.