title: Problem viewing a div with a simple function
body: <p>I have a problem I would say stupid with html and javascript, a simple function that should make me visible and invisible a div crashes the html making it empty!</p>
  <pre><code>&lt;button onclick=&quot;open()&quot;&gt;Modifica&lt;/button&gt;
  </code></pre>
  <p>js:</p>
  <pre><code>var x = document.getElementById (&quot;joseph&quot;);
     if (x.hidden == false) {
       x.hidden = true;
     } else {
       x.hidden = false;
  }
  </code></pre>
  <p><strong>before:</strong>
  <a href="https://i.stack.imgur.com/ELleL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ELleL.png" alt="enter image description here" /></a></p>
  <p><strong>after:</strong>
  <a href="https://i.stack.imgur.com/Se5ru.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Se5ru.png" alt="enter image description here" /></a></p>