Quote:
Originally Posted by WolfShade
I don't completely follow. It has to be shown in order to be clicked, so it's already shown. You can automatically hide anything by using setTimeout("function",x); where x is the number of milliseconds (1000 per second) to call the function.
|
Thanks for your response. I am new to JS as you can see the code below:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
function showArrow(o) {
document.getElementById(o).style.display='block';
setTimeout("showArrow()", 2000);
}
</script>
<a href="javascript: showArrow('arrow');">show that arrow</a>
<div id="arrow" style="display:none; position: absolute; top: 50px; left: 50px;">↗</div>
I have tried above code and it works for showing the hidden DIV however it doesn't automatically hide the DIV. As I don't know where to specify following code for hiding the DIV?
Code:
document.getElementById(o).style.display='none';
Thanks!!