title: Form submit doesn't work after calling return false
body: <p>I have the following code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function stop() {
    $("#login_form").submit(function(e) {
      return false;
    });
  }
  
  function login() {
    var username = $("input[name=username]").val();
    var password = $("input[name=password]").val();
  
    if (username.length &lt; 1) {
      alert("Please enter your username or email address.");
      stop();
    } else if (username.length &gt; 0 &amp;&amp; username.length &lt; 3) {
      alert("Your username or email is incorrect.");
      stop();
    } else if (password.length &lt; 1) {
      alert("Please enter your password.");
      stop();
    } else if (password.length &gt; 0 &amp;&amp; password.length &lt; 6) {
      alert("Your password is incorrect.");
      stop();
    } else if (username.length &gt; 2 &amp;&amp; password.length &gt; 5) {
      $("#login_form").submit(function(e) {
        return true;
      });
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The form submits fine if I enter the correct values initially. However if "return false" is called only once then it won't submit.</p>
  
  <p>How can I fix this? Calling "return true" doesn't work.</p>
  
  <p>EDIT</p>
  
  <p>My html form:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form id='login_form' action='login.php' method='post'&gt;
    &lt;div id='form_item'&gt;
      &lt;div id='form_item_left' style='width: 40%; margin-left: -75px; font-size: 18px;'&gt;Username or Email&lt;/div&gt;
      &lt;div id='form_item_right'&gt;
        &lt;input id='text' type='text' name='username'&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id='form_item'&gt;
      &lt;div id='form_item_left' style='font-size: 18px;'&gt;Password&lt;/div&gt;
      &lt;div id='form_item_right'&gt;
        &lt;input id='text' type='text' name='password'&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div style='height: 5px;'&gt;&lt;/div&gt;
    &lt;div id='form_item'&gt;
      &lt;div id='form_item_right'&gt;
        &lt;span style='display: inline-block; width: 60px;'&gt;&lt;/span&gt;
        &lt;input id='checkbox' type='checkbox' name='remember_me'&gt;
        &lt;span&gt;Remember me&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div style='height: 15px;'&gt;&lt;/div&gt;
    &lt;div id='form_item' style='text-align: center;'&gt;
      &lt;input id='submit' type='submit' name='submit' value='Login'&gt;
    &lt;/div&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>