title: Form submit keeps looping
body: <p>PHere is what is supposed to happen:</p>
  
  <p>on button click, the submit of the form is disabled. then a text swap runs. Upon the completion of the text swap, the var of cancel switches to false and then submits the form.</p>
  
  <p>The problem is that once the form.submit() fires, it loops and the text fades in and out, continually. This also causes the form not to submit.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var cancel = true;
  
      $("#btn-submit").click(
  
      function () {
          if (cancel == true) {
              $('form').on('submit', function (ev) {
                  ev.preventDefault();
                  form = $(".submit-form");
                  fp = $('#free-planner');
                  fp.fadeOut(350, function () {
                      fp.text('Check your email!');
                  });
                  fp.fadeIn(350, function () {
                      cancel = false;
                      if (cancel == false) {
                          form.submit();
                      }
                  });
              });
  
          }
      });
  &lt;/script&gt;
  </code></pre>