title: Submitting ajax form with jQuery, and receiving another form to submit with jQuery
body: <p>I am creating an application which will add a DOM object as a child to another DOM object, and this child can then have child objects. I am using form submission and validation, as shown below. The issue is that when I submit and receive an AJAX response, I add the new form to the DOM, and when that is submitted it bypasses the initializeSubmit function and loads a new page.</p>
  
  <pre><code>jQuery(document).ready(function($) {
      $('#wpbody-content form').each(initializeSubmit);
  });
  
  function initializeSubmit () {
      var $ = jQuery,
          $form = $(this),
          options = {
              submitHandler: function() {
                  var postdata = {},
                      $inputs = $form.find('input, textarea'),
                      edit_fields = {};
                  $inputs.each( function () {
                      // gather postdata
                  });
                  $.ajax( {
                      type : 'POST',
                      dataType : 'html',
                      url : ajaxurl,
                      cache : false,
                      data : postdata,
                      success : function ( response ) {
                              $container = $form.parent();
                              $container.after(response);
                              $newform = $(response).find('form');
                              $newform.each(initializeSubmit);
                      }
                  });
              }
          }
  
      $form.validate(options);
  };
  </code></pre>
  
  <p>I've also tried to use apply instead of each within the success function:</p>
  
  <pre><code>initializeSubmit.apply($newform);
  </code></pre>
  
  <p>A console log shows the appropriate form within a jQuery array for $newform. Any help is appreciated!</p>