hiding & unhiding a div with javascript

so I made a couple divs & I want to make it so that when I press on a link it shows only the div corresponding to it
I tried

HTML:

<a href="#home" onclick="document.getElementById(‘home’).display=inline">Home</a>

but I'm 140% that this is more than wrong
heres the div its supposed to show

HTML:

<div id="playArea">

        <div id="home" style="display: none;">test</div>

        <div id="other1" style="display: none;">test</div>

        <div id="other2" style="display:…

hiding & unhiding a div with javascript

See original post by xXmahriXx

Leave a Reply