showing Wait image
<p>I have the following HTML code</p>

<pre><code>&lt;li&gt;&lt;div&gt;&lt;..&gt;&lt;input type="submit" ...&gt;&lt;/div&gt;&lt;/li&gt;
</code></pre>

<p>i added a click event to the button to remove the Whole <code>&lt;li&gt;</code>. the process takes a while 1/2 second sometime. I wanted to include a message with a wait icon while processing removing I code the following code:</p>

<pre><code>   var $li = $(btnRemove).closest('li').empty();

    // Add Please wait
    var $logo = $('&lt;img&gt;').attr('src', 'logo.gif');
    var $tblWait = $('&lt;table /&gt;').append(
            $('&lt;tr /&gt;').stop()
            .append($('&lt;td/&gt;').append($logo))
            .append($('&lt;td/&gt;').html(' Pleasee wait while removing table'))
            );
    $li.append($('&lt;div/&gt;').append($tblWait));

..... Process and do other tack and finally
$li.remove();
</code></pre>

<p>if i put a breakpoint I will see the logo &amp; and message but without the breakpoint the LI will be removed after 1/2 second but the message neither the logo won't show. I tried to load the image on page ready event, but the logo is really small and doesn't take any time to load. Any help would be greatly appreciated. </p>
