How can I do this?

Discussion in 'JavaScript' started by PinoyIto, Jul 15, 2007.

  1. #1
    I have two object <div> , the first object will display for 10 seconds and after seconds the first object will be hide and the second object will show... Here is the script I created but seem's my script not working...

    
    <div id="first_div" style="position:absolute;z-index:-1;visibility:hidden">
    After 10 seconds this text will show
    </div>
    
     <DIV id="second_div" STYLE ="height:550;width:550;background-color:#eea33e;z-index:2;">
        <h1>First text to show for 10 seconds</h1>
        </DIV>
    
    
    <script language='javascript'>
    
    function reset(){
      second_div.visibility = 'hidden';
      first_div.visibility = 'Visible';
    		}
    setTimeout(\"reset()\",10000);
    </script>
    
    Code (markup):
    Thanks in advance
     
    PinoyIto, Jul 15, 2007 IP
  2. PinoyIto

    PinoyIto Notable Member

    Messages:
    5,863
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    260
    #2
    Never mind, thanks for the time I have figured it out, I guess I forgot to include style in the object....
     
    PinoyIto, Jul 15, 2007 IP