Show a div after short delay

Is there some JS that someone can point out that would show a DIV after a short delay?

So after the page loads, there is a few seconds delay and a div layer suddenly appears where ever I want.

Thanks,
shanfeld

Sure. What’s the ID of your div? Is it absolutely positioned? (If it is then I can add Netscape 4.x support.)

Here is an example:

<html>
<head><title></title>
<style type="text/css">
<!--

.hide{
	display:none;
}
.show{
	display:block;
	position:absolute;
	left: 200px;
	top: 200px;
	color: blue;
}

-->
</style>
<script type="text/javascript" language="javascript">
<!-- Hide from browsers without javascript

window.onload=function()  //executes when the page finishes loading
{
	setTimeout(func1, 2000);  //sets a timer which calls function func1 after 2,000 milliseconds = 2 secs.
	
};
function func1()
{
	document.getElementById("my_div").className="show";
}

// End hiding -->
</script>
</head>
<body>

<div>main page</div>
<div id="my_div" class="hide">some text</div>

</body>
</html>

7stud,

Perfect! Thank you very much.

shanfeld

so, what if i had a dropdown menu that i want to hide after 2 secs…
how abouts do i do that?