General
This script creates a ticker by parsing existing semantic markup. Easy to set-up.
Latest News:
- Cat reported to have secured a fiddle.
- Cows: Able to leap orbiting satellites?
- People alarmed to hear small dog laughing.
- Fork devastated as Spoon runs off with Dish.
Notes
- Created by: Steve Chipman
- Web Site: http://slayeroffice.com/
- Posted: June 25, 2008
The JavaScript is namespaced and written as an Object Literal. It initializes from the so_ticker.init method which should be called from your onload event handler.
If the user mouses over the ticker or sets focus to it (i.e., tabs to it), the complete text for the item will expand and the ticker will pause until the user mouses out or the ticker loses focus to another element. The title attribute of the ticker is set to the text content.
Clicking on (or otherwise activating) the plus sign will expose all of the content at once, stop the ticker and set focus to the first anchor element.
If JavaScript isn’t available, the user is given a regular list of items below a heading.
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: soTicker.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
Other
Download the images using the URL below:
- Download the images here