Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling Text

Status
Not open for further replies.

wuzzle

Programmer
Dec 20, 2000
75
CA
There is scrolling text here: (the 3rd example) but I have no idea why it works. Could someone please explain this to me?
Thanks.

function ex3(obj){
if(ex3switch=="on"){
document.getElementById(obj).style.display="inline";
if(pos > -100){
document.getElementById(obj).style.left=pos+"%";
pos--;
setTimeout("ex3('eg3')", 100);
}else{
pos=100;
setTimeout("ex3('eg3')", 100);
}
}else{document.getElementById(obj).style.display="none"}
}
 
it's using style sheets - CSS positionning
you can read about it on the w3c siten (there must be easy tutorial somewhere but i don't know where - w3c will give you the full specification & syntax etc)
basically this function says : if the text should not be visible, hide it, else if the text is above a certain value, scroll else don't move
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top