Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[click-box]">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>click-box</title>
</head>
<body>
  <div class="bouton" onclick="test('menu')"><h1>Clic ici</h1>
     
        <div id="menu" style="visibility:hidden">
        Élément à rendre visible et invisible.
  </div>
  </div>
</body>
</html>
 
function test(elem) {
  etat = document.getElementById(elem).style.visibility;
            if(etat == "hidden")
                document.getElementById(elem).style.visibility = "visible";
            else
                document.getElementById(elem).style.visibility = "hidden";
        }
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
romain-Esa75pro
0viewers