Script Categories













Scrolls >>> Expanding Text.

Draw attention to information on your site with JavaScript-powered expanding text! Just enter the text you want to use, the max size you want it to reach, and speed it should "grow" and it's ready to go.

Add the below code to the <body> section of your page:

<center>
<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var speed = 100;
var cycledelay = 2000;
var maxsize = 28;

var x = 0;
var y = 0;
var themessage, size;
var esize = "</font>";

function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
   }
}
var themessage2 = new initArray(
"JavaScript can do some amazing stuff !",
"Including this expanding text banner !",
"Have you ever seen one of these before ?",
"Neither have your visitors, so put it on your site!!"
);

document.write('<span id="wds"></span><br>');
function upwords(){
themessage = themessage2[y];
if (x < maxsize) {
x++;
setTimeout("upwords()",speed);
}
else setTimeout("downwords()",cycledelay);

wdss=document.getElementById('wds');

wdss.innerHTML = "<center>"+themessage+"</center>";
wdss.style.fontSize=x+'px'
}
function downwords(){
if (x > 1) {
x--;
setTimeout("downwords()",speed);
}
else {
setTimeout("upwords()",cycledelay);
y++;
if (y > themessage2.length - 1) y = 0;
}


wdss.innerHTML = "<center>"+themessage+"</center>";
wdss.style.fontSize=x+'px'
}
setTimeout("upwords()",speed);
//  End -->
</script>
</center>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

http://www.cashadvance-loans.net/oklahoma/cash-advance-stillwater-ok/


©