title: Hide show based on selected Radio Button
body: <p>I was experimenting with some JS for a form I have been working on. The aim is to hide if they  user has not selected yes. Here is where I am some what stuck at:
  HTML:</p>
  
  <pre><code>&lt;asp:RadioButtonList runat="server" ID="rbMatchingGift" ClientIDMode="Static"&gt;
      &lt;asp:ListItem Value="0" Text="No"&gt;&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="1" Text="Yes"&gt;&lt;/asp:ListItem&gt;
  &lt;/asp:RadioButtonList&gt;
  &lt;li id="shcompany"&gt;                 
      &lt;label for="txtCompanyName"&gt;Company Name&lt;/label&gt;
      &lt;asp:TextBox runat="server" ID="txtCompanyName" CssClass="narrow" /&gt;   
      &lt;label for="txtCompanyPhone"&gt;Company Phone Number&lt;/label&gt;
      &lt;asp:TextBox runat="server" ID="txtCompanyPhone" CssClass="narrow" /&gt;       
  &lt;/li&gt; 
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document).ready(function () { 
      var shcompany = $('#shcompany'); 
      showHide();
      mgift.change(function () {
          showHide();
      });
  
      function showHide() {
          var mgift = $('#rbMatchingGift');
          var shcompany = $('#shcompany');
  
          if (mgift.val() == "1") {
              shcompany.show();
          } else {       
              shcompany.hide();        
          }
      }
  });
  </code></pre>