JQuery function Adding progress animation
<p>I would like to add a progress animation to a function so that it displays at the begining of the function and then disappears at the end of it.</p>

<p>Something like:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function myfunction() {
   //Display progress animation here
   $('input[type=submit]#submit').click();
   etc...
   //Hide the progress animation here
}
?&gt;
</code></pre>

<p>UPDATE:</p>

<p>Here is my current Ajax code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function myfunction() {
    $("#ajax-form").submit(function(){
        $.post("submit.php",
        $("#ajax-form").serialize(),
            function(data){
          mysubmitForm();

            }

        );
        return false;

    });
}
&lt;/script&gt;
</code></pre>
