Streaming Horizontal Banner | JavaScriptSource

Streaming Horizontal Banner

Jeroen Haan Jul 16, 2007

General

Add a horizontal banner roll to your Web site with this easy-to-use script. Each banner can also include a URL. The size can be set in the script file.


Notes

In order the have the script working in FireFox as well you need a proper "DTD" to prevent the browser's "quirksmode". See http://www.quirksmode.nl/ for more details.

Or in case you experience problems, copy and paste next line on top of your Web page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: streamingBannerHorizontal.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(7 comments)

this script is junk if you try to use more than 3 images...tried with 10 and it does not work correctly even after making adjustments to the pixel sizes of the divs.....you are better off using something else.

Brian Mar 26, 2012

Your question is beyond the scope of these comments. You will need to post it over on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Oct 31, 2008

The script works fine when run locally on my machine. As soon as I put the pages online, the images in the banner are static. They no longer move. Any clue?

Corry May 13, 2008

No, it can go in the head section. It works just fine that way.

Lee Dec 4, 2007

<script type="text/javascript" src="streamingBannerHorizontal.js"></script>[br /][br /][br /]the above code must put between <body> tags.

hANjEK Nov 29, 2007