onclick show div and hide other div

Solutions on MaxInterview for onclick show div and hide other div by the best coders in the world

showing results for - "onclick show div and hide other div"
Dario
17 Nov 2016
1<div id="1">A DIV element...</div>
2<div id="2">Another DIV element</div>
3<div id="3">The third DIV element</div>
4<div id="4" onclick="hide()">Click me to hide the other DIVs</div>
5<script type="text/javascript">
6function hide() {
7	document.getElementById("1").hidden = true;
8	document.getElementById("2").hidden = true;
9	document.getElementById("3").hidden = true;
10	document.getElementById("4").hidden = false;
11}
12</script>
queries leading to this page
show hide element clickbutton onclick div show hideshow hide when clickonclick div but don 27t include inside div show hideshow and hide divs on button clickon anchor click div hide and showclick to show and hide divshow one div and hide other on button click jsfiddlehide div on clickonclick function with hide and showonclick show div and hide other divon click hide show divshow or hidden div on chlickdiv onclick hidehide and show div on button clickshow hide div when click other div onclick show div and hide other div jqueryjavascript show 2fhide div on clickon button click hide all other div and show anotherhide one div and show another jsonclick function show divon click show divhtml show hide div onclick togglehide div onclickshow and hide a div onclickafter click button show and hide elementhow to hide a div and show on clickshow one div and hide another on button clickshow hide div onclickonclick hide element show elementshow or hide elements onclickjavascript show 2fhide div onclickhide div when click other div javascriptshow and hide on clickbutton onclick hide and show divshow and hide div by a button clickclick show div and document any click hidewhen click div show when second click it hideonclick hide and show div in javascripthide div content on button click and diplay other contenthide and display div on button clickshow one div and hide other on button clickon click div hidejs show and hide element when click another sideonclick show div and hide other div