title: Undo preventDefault() method
body: <p>I was wondering if there was any way of "undoing" the preventDefault() method on submit. I have this code that does the trick, but I want to know if there is a more efficient way of doing it.</p>
  
  <pre><code>var $form = $('form');
  var canSubmit = false;
  
  $form.data('working', false);
  
  $form.submit(function(e){
      if (form.validations.form($form)) {
          if (!$form.data('working')) {
              $form.data('working', true);
  
              if (canSubmit) {
                  // make the post here
              } else {
                  e.preventDefault();
                  $.get(BASE+'file.txt', function(response){
                      $form.data('canSubmit', true);
                      $form.submit();
                  });
              }
          }
      } else {
          $form.data('working', false);
          e.preventDefault();
          return false;
      }
  });
  </code></pre>
  
  <p>This is because I have to read and write a file after the validations are done and only after that make the post to the page.
  The post can't be done by ajax.</p>
  
  <p>Thanks</p>