Hi,
Is there any way of fading in some text without using <body onLoad()>?
I need something that works like this
But that doesnt require the body part.Code:<html> <head> <script language="javascript"> var r = 255; var g = 255; var b = 255; function fade(id) { document.getElementById(id).style.visibility = "visible"; document.getElementById(id).style.color="rgb(" + r + "," + g + "," + b + ")"; r -= 5 g -= 5 b -= 5 if(r>0) setTimeout("fade('"+id+"')", 40); } function startfade(id) { window.setTimeout("fade('fade');", 100); } </script> </head> <body onLoad="startfade('fade');"> <p> <span id="fade" style="visibility: hidden;">This text needs to fade in 8 seconds after page load!</span><br> test </p> </body></html>
Any ideas?!
Thanks
Sorry, is there any way of moving this to the Javascript forum?!






Bookmarks