title: How do I reverse an onclick event with another click?
body: <pre><code>function show()
  {
  var elem = document.getElementById("pop").querySelector('li:nth-child(3)');
  elem.style.width = "500px";
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I have this code attached to an onclick</p>
  
  <pre><code>&lt;li onclick="show()"&gt;
  </code></pre>
  
  <p>The element is originally 200px and then turns into 500px when clicked. How do I make it work so that when I click it again it goes back to 200??</p>