title: Hide a div based on select radio button in a form
body: <p>I have a form where you have to choose between two <code>input type="radio"</code>, one says <strong>yes</strong> and the other one says <strong>no</strong>.<br>
  I want to make a div that is visible in the form disappear when you select the <strong>no</strong> option. I tried by copying some JS from other posts I read on the internet, but nothing worked for me.<br>
  Can someone tell me the code I should use? It can be JS, PHP or CSS.</p>
  
  <p>Here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form-radio"&gt;
  &lt;label for="sons" class="radio-label"&gt;Question:&lt;/label&gt;
  &lt;div class="form-radio-item"&gt;
  &lt;input type="radio" name="yes" id="yes" checked value="YES"&gt;
  &lt;label for="hsi"&gt;YES&lt;/label&gt;
  &lt;span class="check"&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;div class="form-radio-item"&gt;
  &lt;input type="radio" name="no" id="no" value="NO"&gt;
  &lt;label for="hno"&gt;NO&lt;/label&gt;
  &lt;span class="check"&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="hello"&gt;
  You clicked on NO, so this div disappears.    
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>