Show/Hide image before filtering a table isn't working
<p>I have web page with some really large tables that I'm filtering using some jquery routines I wrote. Anyway, when these tables get really large and the filtering functions can take some time to complete. So I figured I'd unhide a animated gif so the user had some feedback. However, the gif never appears when I call: </p>

<pre><code>$('#loadingimg').show(); 
</code></pre>

<p>Unless I put an alert statement in front of it. I apologize for the ugly code, I'm not an experienced jquery/javascript programmer.</p>

<pre><code>function filter()
{
    var eles = ["mtmprogram","rate","stage"];
    var tag;
    var classes='';

    $('#loadingimg').show();
//alert('hi');
    $('.report').hide();

    for (var i in eles)
    {
        tag = '#' + eles[i] + ' option:selected';
        if ($(tag).val())
        {
            //$('.'+ $(tag).val()).show();
            classes = classes + '.' + $(tag).val();
        }
    }
    if (classes == '')
        $('tr.report').show();
    else
        $(classes).show();

    filterSubtables('Loan Number');
    $('#loadingimg').hide();

}
</code></pre>

<p>Many thanks!</p>
