I'm working on a page that display an image and after 5 seconds hide it and show another image so here's my code
<script type = "text/javascript">
function hideit()
{
var o = document.getElementById('first');
o.style.display = 'none';
}
function ShowDiv()
{
var dv = document.getElementById("second") ;
dv.style.visibilit = 'visible';
}
window.onload = function(){
setTimeout("hideit()",5000); // 5 seconds after user (re)load the page
setTimeout("ShowDiv()", 5000);
};
</script>
And here's my HTML code :
<div id="first" class="auto-style1"><img src="index_files/pleasewait.png" style="visibility:visible" /></div>
<div id="second" class="auto-style1"><img src="index_files/done.png" style="visibility:hidden" /></div>
However the above code work fine but it's only hide the first div and don't show the second div I don't know why
So if you have any idea why the above code only hide the first div and didn't show the second one let me know