title: jquery form submission prevent default
body: <p>I'm trying to make a simple email form on a landing page. For testing purposes, I don't want to actually submit the form. But every time I click it, it prevents my attempts to prevent the default. No matter how I exit the submit() function, it insists on submitting this form!</p>
  
  <pre><code>$(document).ready( function () {
  function validateEmail($email) {
      var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
      if( !emailReg.test( $email ) ) {
          return false;
      } else {
          return true;
      }
  }
  
  $("#email_box").click( function () { $(this).val(''); } );
  
  $("#email_form").click(
  
  function(e) {
      var valid = validateEmail($("#email_box").val());
  
  
      if (!valid)
      {
          $("#error_msg").fadeIn("slow");
      } else {
          $("#error_msg").style("display", "none");
          $("#email_box").val("Thanks, you'll hear from us soon!").fadeIn("slow");
          //$("#thank_you_msg").fadeIn("slow");
      }
  
      e.preventDefault();
      return false;   
  }
  
  );
  
  });
  </code></pre>
  
  <p>Why is a request still being sent?</p>
  
  <p>Truely the most bizarre thing for me is that if the form is not valid, it DOES NOT submit. But if the form is in fact valid, it submits!!</p>