ZeroShade Posted July 16, 2007 Share Posted July 16, 2007 I'm trying to make some text delay on visibility. But I can't seem to get the first part of the setTimeout right. Basically the ID="UnsupportedMessage" is part of a span tag and all it holds is plain text in it. After the time delay I want the text to become visible but be invisible before that timeDelay. Am I on the right path? <script language="javascript" type="text/javascript"> var res = null; var timeDelay = 5000; var text = document.getElementById("UnsupportedMessage"); res = setTimeout("", timeDelay); </script> Link to comment Share on other sites More sharing options...
justsomeguy Posted July 16, 2007 Share Posted July 16, 2007 You're not telling setTimeout to do anything. The setTimeout function needs a function name to call after the timeout. function make_vis(){ document.getElementById("UnsupportedMessage").style.display = "block";}setTimeout("make_vis", 5000); Link to comment Share on other sites More sharing options...
ZeroShade Posted July 16, 2007 Author Share Posted July 16, 2007 I see... thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.