|
↑
Scrolls >>>
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">
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);
</script>
</center>
|
→ http://www.cashadvance-loans.net/oklahoma/cash-advance-stillwater-ok/
|