I am having a memory block today and for the life of me cant seem to get it right.
Can someone help me with code to fade text in 8 seconds after the page has loaded.
This is what i have but i dont want it to appear straight away. How do i add an 8 second delay to the text fading in.??
Can someone help me with code to fade text in 8 seconds after the page has loaded.
This is what i have but i dont want it to appear straight away. How do i add an 8 second delay to the text fading in.??
Code:
<html> <head> <script language="javascript"> col=255; function fade() { document.getElementById("fade").style.color="rgb(" + col + "," + col + "," + col + ")"; col-=5; if(col>0) setTimeout('fade()', 50); } </script> </head> <body onLoad="fade()"> <p> <span id="fade">This text needs to fade in with an 8 second delay.</span> </p> </body></html>
Comment