title: Submit form via AJAX in jQuery
body: <p>I am using following jQuery code to submit a form via AJAX.</p>
  
  <pre><code>jQuery('form.AjaxForm').submit( function() {            
          $.ajax({
              url     : $(this).attr('action'),
              type    : $(this).attr('method'),
              dataType: 'json',
              data    : $(this).serialize(),
              success : function( data ) {
                          alert('Submitted')
                        },
              error   : function( xhr, err ) {
                          alert(''Error);     
                        }
          });    
          return false;
      });
  </code></pre>
  
  <p>Code is working perfectly with no ajax. <strong>But does not work if I load form via ajax. I think it is because of loading form via ajax after JavaScript load.</strong></p>
  
  <p>Any solution?</p>