title: How can I show a hidden div when a select option is selected?
body: <p>I want to use plain JavaScript. I have a drop down list (<code>&lt;select&gt;</code> with a number of <code>&lt;option&gt;</code>s). When a certain option is selected I want a hidden div to display.</p>
  <pre><code>&lt;select id=&quot;test&quot; name=&quot;form_select&quot;&gt;
     &lt;option value=&quot;0&quot;&gt;No&lt;/option&gt;
     &lt;option value =&quot;1&quot; onClick&quot;showDiv()&quot;&gt;Yes&lt;/option&gt;
  &lt;/select&gt;
  &lt;div id=&quot;hidden_div&quot; style=&quot;display: none;&quot;&gt;Hello hidden content&lt;/div&gt;
  </code></pre>
  <p>Then I'm trying it with this vanilla JavaScript code:</p>
  <pre><code>function showDiv(){
     document.getElementById('hidden_div').style.display = &quot;block&quot;;
  }
  </code></pre>
  <p>I'm guessing my problem is with the onClick trigger in my options but I'm unsure on what else to use?</p>