title: jquery tools validation re-bind after loading different content
body: <p>I'm using the jquery tools validation plugin for client side form validation.
  i have one javascript file which loads the function below on ready.</p>
  
  <p>What i'm doing is, i load a form, when this is being validated successfully and submitted,
  i load another form, and would like the function below to handle any form thats being loaded
  within the if (json.success &amp;&amp; json.next) statement block.</p>
  
  <p>For some reason, when the second form is loaded, the validator is not being re-bound to the
  class (.signup_form) of the new form, and the validation does not occur.</p>
  
  <p>any idea how i could attach a $.live or anything to this, so it'll automatically rebind itself to whatever form gets loaded with the .signup_form class after success?</p>
  
  <pre><code>/* For clarification: json.next is the url of the next form to load */
  
  $(".signup_form").validator({
  position: 'top left', 
  offset: [-12, 0],
  message: '&lt;div&gt;&lt;em/&gt;&lt;/div&gt;' // em element is the arrow
  }).submit(function(e) {
  
    var form = $(this);
  
    // client-side validation OK.
    if(!e.isDefaultPrevented()) {
  
      // submit with AJAX
      $.post(form.attr('action'), form.serialize(), function(json) {
  
        // everything is ok. (server returned true)
        if (json.success &amp;&amp; json.next)  {
          form.parent().parent().load(json.next); // Slide here
          form.reset();
  
        // server-side validation failed. use invalidate() to show errors
        } else {
          form.data("validator").invalidate(json);
        }
      }, "json");
  
      // prevent default form submission logic
      e.preventDefault();
  
    }
  });
  </code></pre>
  
  <p>any help is greatly appreciated.
  T</p>
  
  <p><strong>Okay, i figured it out... geez its so obvious.</strong></p>
  
  <p>so all of the code above i have within a</p>
  
  <pre><code>form_listener = function() {}
  </code></pre>
  
  <p>block.</p>
  
  <p>now all i need do do is to call the form listener after i load the new form:</p>
  
  <pre><code>.
  .
        // everything is ok. (server returned true)
        if (json.success &amp;&amp; json.next)  {
          form.parent().parent().load(json.next, function(){
          form_listener();
        });
  
  .
  .
  </code></pre>
  
  <p>sweet.</p>