title: Can't replace submit button with JQuery
body: <p>I'm trying to do my first tests usign JQuery and it seems to be more difficult than what I expected.
  I have a simple form calling some long operations. What I want is to display a progress bar during the loading. What I try to do in the following code is to replace the submit button with a progress bar when the user submits the form. The next page taking time to load, he will see a nice animation making him wait.</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Test form&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;form id="myCuteLittleForm"&gt;&lt;input type="submit" id="submit"/&gt;&lt;/form&gt; 
      &lt;br /&gt;
      &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;
        $(document).ready(function() {
          $('#myCuteLittleForm').submit(function() {
            $("#submit").replaceWith('&lt;progress value="" max=""&gt;Import en cours.&lt;/progress&gt;');
          });
        });
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However, to my great distress, it doesn't work. Am I just doing bad jquery or is there a fundamental incomprehension ?</p>