Why does my spinner GIF stop while jQuery ajax call is running?
<p>I'm just starting to wean myself from ASP.NET UpdatePanels. I'm using jQuery and jTemplates to bind the results of a web service to a grid, and everything works fine. </p>

<p>Here's the thing: I'm trying to show a spinner GIF while the table is being refreshed (à la UpdateProgress in ASP.NET) I've got it all working, except that the spinner is frozen. To see what's going on, I've tried moving the spinner out from the update progress div and out on the page where I can see it the whole time. It spins and spins until the refresh starts, and stays frozen until the refresh is done, and then starts spinning again. Not really what you want from a 'please wait' spinner!</p>

<p>This is in IE7 - haven't had a chance to test in other browsers yet. Any thoughts? Is the ajax call or the client-side databinding so resource-intensive that the browser is unable to tend to its animated GIFs?</p>

<h3>Update</h3>

<p>Here's the code that refreshes the grid. Not sure if this is synchronous or asynchronous.</p>

<pre><code>updateConcessions = function(e) {
    $.ajax({
        type: "POST",
        url: "Concessions.aspx/GetConcessions",
        data: "{'Countries':'ga'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            applyTemplate(msg);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
        }
    });
}

applyTemplate = function(msg) {
    $('div#TemplateTarget').setTemplate($('div#TemplateSource').html());
    $('div#TemplateTarget').processTemplate(msg);
}
</code></pre>

<h3>Update 2</h3>

<p>I just checked the <a href="http://docs.jquery.com/Ajax/jQuery.ajax#options">jQuery documentation</a> and the <code>$.ajax()</code> method is asynchronous by default. Just for kicks I added this</p>

<pre><code>$.ajax({
    async: true,
    ...
</code></pre>

<p>and it didn't make any difference.</p>
