Jump to content
Forum Roportal
Sign in to follow this  
Vlad_spy90

javascript submeniu

Rate this topic

Recommended Posts

am urmatorul script:

 

 

function showlayer(layer){

var myLayer = document.getElementById(layer).style.display;

if(myLayer=="none"){

document.getElementById(layer).style.display="block";

} else {

document.getElementById(layer).style.display="none";

}

}

 

 

si html:

 

<a href='#' onclick="java script:showlayer('submeniu1')">SELF-PORTRAIT</a>

<a href='#' onclick="java script:showlayer('submeniu2')">THE OBJECT</a>

<a href='#' onclick="java script:showlayer('submeniu3')">STUDIES FOR THE CHANGE</a>

 

vreau ca in momentul cand un div este visibil, si deschid alt div, cel visibil sa devine hidden.

 

 

adica in momentul de fata pot sa le deschid pe toate odata.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×