title: Trying to submit a form with $.post. It works but the callback function doesn't trigger
body: <p>I have a form that I want to submit without redirecting the page. It mostly works, but I want to disable the submit button after it gets clicked.</p>
  
  <pre><code>&lt;form name="confirm" id="confirm" method="post" action="confirm.php"
        style="margin:0; display:inline-block"&gt;
      &lt;input type="text" class="form-control" name="email" id="email"
             style="display: inline-block; width:unset;"&gt;
      &lt;button class="btn btn-primary" id="bttnSubmit" value="submit"&gt;Send Email&lt;/button&gt;
  &lt;/form&gt;
  
  $(document).ready(function(){
      var $form = $('form');
      $form.submit(function(){
          $.post($(this).attr('action'), $(this).serialize(), function(response) {
              $("#bttnSubmit").removeClass('btn-primary')
                              .attr("disabled","disabled");
          },'json');
          return false;
      });
  });
  </code></pre>