This article has been written 1397 days ago.
The informations may be out of dated!
TextScroller is a JavaScript library that permit to scroll the text of the target ID of the web page. It's easy to use, easy to configure and require just javascript enable on the browser's client surfing you web pages.
How to setup the script
Using your favorite text editor open the file named textScroller.js and assign the values to the following variables:
var orientamento = '';
var parent = '';
var duration = ;
var h = ;
var w = ;
var orientamento (array)
Choose the prefered scrolling direction:
- TD: from top to bottom;
- DT: from bottom to top;
- RL: from right to left;
- LR: from left to right;
var parent (string)
The ID element containing the scrolling text.
var duration (integer)
Scrolling speed. Bigger means slowest and vice versa.
var h (integer)
The height value of the scrolling ID. By this way you can choose the height of the scrolling text.
var w (integer)
The width value of the scrolling ID. By this way you can choose the width of the scrolling text.
Impostare il codice HTML
Between the <head> tags insert this line.
<script type="text/javascript" src="textScroller.js"></script>
Warning: consider the relative positione of the file. Writing the line exactly as above, the js file must be in the same folder of the html file.
Inside the <body> tag:
<body onload="letsGo()">
Inside the page, insert an element identified by the ID you want to scroll.
<div id="parent">
Testo da scrollare
Testo da scrollare
Testo da scrollare
</div>
Degradability
The code is degradated. When the client has JavaScript disabled, will be loaded the CSS directives written in the stylesheet.
Extra Style
You can add extra style directives by adding css information for the id named width child- prefix and the ID of the scrolling element.
License
Demo



















