title: submit form without page refresh - click function toggle() not working after submit
body: <p>I have a form which processes without page refresh, it works great, saves to db etc.</p>
  
  <p>But once i have submitted the form the click function below does not toggle anymore unless i refresh the page.</p>
  
  <pre><code>$("#pinlink").click(function () {
          $("#pincontent").toggle();
  });
  </code></pre>
  
  <p>Here is the code: </p>
  
  <pre><code>echo'&lt;strong&gt;Printer PIN:&lt;/strong&gt;&amp;nbsp;&lt;a id="pinlink"&gt;&lt;img src="images/edit.png" width="18px" height="18px" title="Edit you PIN number"&gt;&lt;/a&gt;
  
  &lt;div id="results"&gt;&lt;div&gt;
  
  &lt;div id="pinnumber"&gt;'.$learner-&gt;idnumber.'&lt;div&gt;                 
  
  &lt;div id="pincontent" style="display:none;"&gt;
  &lt;form name="myform" id="myform" method="POST" enctype="multipart/form-data"&gt;  
  &lt;input type="text" name="idnumber" id="idnumber" placeholder="Enter your new PIN" size="20" value=""/&gt;
  &lt;input name="id" type="hidden" value="'.$learner-&gt;id.'" /&gt;      
  &lt;input type="submit" name="submit" value="Update"&gt; 
  &lt;/form&gt;
  &lt;div&gt;';
  
  
  $(document).ready(function(){
  
      $("#pinlink").click(function () {
      $("#pincontent").toggle();
      });
  
      $("#myform").validate({
          debug: false,
          rules: {
              idnumber: "required",
          },
          messages: {
              idnumber: "Please enter your PIN",
          },
          submitHandler: function(form) {
              $("#pincontent").hide();
              // do other stuff for a valid form
              $.post('process.php', $("#myform").serialize(), function(data) {
                  $('#results').html(data);
              });
          }
      });
  });
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>