title: How can hide the textbox on basis on checkbox in JSP
body: <p>In my JSP page two fields one is textbox and one is checkbox, I tried with     j query and java script also for hiding the textbox on checked of checkbox but it is not reflecting. Below I am mentioning code here</p>
  
  <pre><code>&lt;p class="contact"&gt; &lt;input id="check" name="check" value="check" style="margin-right: 10px" type="checkbox" tabindex="11"&gt;
          &lt;label for="name"&gt; Not Yet Registered&lt;/label&gt; &lt;/p&gt;
  
  
          &lt;p class= "reg"&gt;&lt;label for="reg"&gt;Register No.&lt;/label&gt;&lt;/p&gt;&lt;br&gt;
          &lt;input id = "reg" maxlength="15"  name= "reg" placeholder="Reg No." type ="text" tabindex="12"&gt;&lt;br&gt;&lt;br&gt;
  </code></pre>
  
  <p>J query</p>
  
  <pre><code>$('#check').click(function() {
    $('.reg')[this.checked ? "hide" : "show"]();
  });
  </code></pre>
  
  <p>Kindly Help me out</p>