title: Unable to submit the ajax form multiple times after using .submit() function
body: <p>This is my code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var onloadCallback = function() { 
   $( "#submit" ).each(function() {
          grecaptcha.render($( this ).attr('id'), {
              'sitekey' : '6Lcjvi4UAAAAAIR7_ckItF2HfMEFHx427WUDdGDk',
              'callback' : onsubmitforgotpass
          });
      });
  };
  
  
  
  function onsubmitforgotpass(token) {
    $(document).ready(function() {
      $("form.formajax").submit(function() {
        $.ajax({
          type: "POST",
          url: "admin/login/forgotpass.php",
          data: $("form.formajax").serialize(),
          cache: false,
          success: function(result) {
            $(".forgotpassresult").html(result);
            $(".forgotpassresult").css("opacity", "1");
          }
        });
        return false;
      });
      
      $("form.formajax").submit();
    });
  };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;form action="" method="post" class="formajax"&gt;
    &lt;input type="text"&gt;
    &lt;input type="submit" id="submit"&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am unable to submit this ajax form multiple times.</p>
  
  <p>It is probably because of these 2 lines:</p>
  
  <p><code>$("form.formajax").submit(function()</code>
  and 
  <code>$("form.formajax").submit();</code></p>
  
  <p>If I replace those line with <code>$("#submit").click(function()</code> and <code>$("#submit").click();</code></p>
  
  <p>Then I can submit the form multiple times.</p>
  
  <p>Anyway to submit the form multiple times using <code>.submit();</code> function? (It will help me in some other part of my code also, so I do not want to use <code>click();</code></p>