title: Form still submits on preventDefault
body: <p>I am using jQuery to submit form data to a file in the form's action. However, when I submit the form, the browser redirects to the action (comment.php). I don't know why this is because <code>e.preventDefault()</code> should stop the browser's redirection. Ideally, I would like the browser to not redirect and remain on the current page (index.php).</p>
  
  <p>jQuery:</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
      $('document').ready(function(){
          $('.commentContainer').load('../writecomment.php');
          $('.answerContainer').on('submit', 'form', function(e){
              e.preventDefault();
              var form = $(this).closest('form');
              $.post($(form).attr('action'), 
              $(form).serialize(), 
              function() {
                  $('.commentContainer').load('../writecomment.php');
                  $('.commentBox').val('');
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML Form:</p>
  
  <pre><code>&lt;form method='POST' action='../comment.php'&gt;
      //form contents
  &lt;/form&gt;
  </code></pre>