title: Firefox and Jquery/Javascript form submission
body: <p>I have a problem in firefox, where I'm trying to get a form submission button to display "loading" when a person clicks on it (to prevent multiple submissions of a user clicking it two/three times due to a slow site).</p>
  
  <p>I have this jquery code:</p>
  
  <pre><code>$(document).ready(function(){
       $('.submitButton').click(function() {
          document.aform.submit();
          $('.buttonSpan').html('&lt;button class="btn btn-primary disabled"&gt;Loading...&lt;/button&gt;');
  
       });
  });
  </code></pre>
  
  <p>Chrome executes it correctly, but Firefox <em>only</em> changes the HTML in the span surrounding but <em>doesn't</em> submit the form. Firefox submits when i click the button <em>twice</em>. If I remove the line of the .html() changing, it also submits with no problem.</p>
  
  <p>Here is the form code for reference:</p>
  
  <pre><code>&lt;form name="aform" action="index.php" enctype="multipart/form-data" method="post"&gt;
      ...form data
      &lt;span class="buttonSpan"&gt;
           &lt;button class="btn btn-primary submitButton" name="submit"/&gt;Submit&lt;/button&gt;
      &lt;/span&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Does firefox put precedence on html changes and ignore everything else? Again, this works fine in Chrome, but firefox is really killing me!</p>
  
  <p>Thanks!</p>