title: Form preventDefault then activate again not working
body: <p>I have a little form in my modal which looks like this:</p>
  
  <pre><code>    &lt;form name="form" action="" method="post"&gt;
            &lt;div class="modal-body"&gt;
                &lt;input type="text" name="edited_id" value="" id="edited_id" class="hidden"/&gt;
                &lt;div class="form-group"&gt;
                  &lt;label for="name"&gt;Name&lt;/label&gt;
                  &lt;input type="text" name="edited_name" class="form-control" id="edit_name" value=""&gt;
                &lt;/div&gt;
                &lt;div class="form-group"&gt;
                  &lt;label for="email"&gt;Email&lt;/label&gt;
                  &lt;input type="email" name="edited_email" class="form-control" id="edit_email" value=""&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;input type="submit" name="edit_submit" class="btn btn-primary" value="Edit user"/&gt;
            &lt;/div&gt;
        &lt;/form&gt;
  </code></pre>
  
  <p>and I want to prevent the form to submit if the user enters an email that it is already in my database. I have the following script:</p>
  
  <pre><code>$("#check_email").click(function() {
      var email = $(this).parent().siblings().find("#email").val();
      var that = $(this);
      $(this).parent().parent().submit(function( event ) {
          $.get("php/verify_email.php", {email: email}, function(data){
              if(data === "")
              {
                  that.parent().parent().unbind('submit').submit();
              }
              else {
                  alert(data);
                  event.preventDefault();
              }
          });
      });
  });
  </code></pre>
  
  <p>The problem is that if I put the <code>even.preventDefault()</code> in that else condition, the <code>$.get()</code> seems to not trigger, because I guess that the form submits faster. Otherwise if I put the <code>event.preventDefault()</code> right after the <code>.submit(function( event ) {</code> then I can't unbind the submit to work after the user changes the email.</p>
  
  <p>What I am doing wrong?</p>
  
  <p>P.S.</p>
  
  <p>My php file looks like this:</p>
  
  <pre><code>&lt;?php
  include "connect.php";
  
  if(isset($_GET['email']) &amp;&amp; !empty($_GET['email'])){
  
      $sql = "SELECT * FROM users WHERE email='".$_GET['email']."';";
  
      $result = $conn-&gt;query($sql);
  
      if ($result-&gt;num_rows &gt; 0){
          echo "The email is already in our database. Please try another one!";
      }
  }
  
  ?&gt;
  </code></pre>