title: Jquery toggle form on button click
body: <p>I want to show a form only when a button is pressed. This works fine.
  When I click the button again I want form to dissapear. Can someone explain what the problem is?
  Thank you!</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  
   $('#instantchannel').hide(); //Initially form wil be hidden.
   var numclicks = 2
    $('#instant').click(function() {
    if(numclicks%2==1){
    numclicks=++;
     $('#instantchannel').show();//Form shows on button click
  }else{
  numclicks=++;
   $('#instantchannel').hide();//Form shows on button click
  }
     });
   });
   &lt;/script&gt;
  </code></pre>