title: Why is my page reloading even though I have event.preventDefault (form handling jquery + node.js)
body: <p>I am using jQuery to asynchronously post my data to my db using node.js and express.js</p>
  
  <p>Here is roughly what I am doing:</p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;form id='mailer' action='/mail/new' method='post'&gt;
    &lt;input name='mycontent'/&gt;
    &lt;input type='submit'/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>script.js:</p>
  
  <pre><code>$("#mailer").submit(function(e){
    e.preventDefault();
    $.post('/mailer/new',{mycontent:mycontent});
  });
  </code></pre>
  
  <p>app.js:</p>
  
  <pre><code>app.post("/mailer/new",function(){
    //insert into database
  }
  </code></pre>
  
  <p>So it is essentially submitting to my database but ignoring the e.preventDefault because my page shows the loader wheel when I press submit</p>