Is there any way we can stop the animate in Jquery (also stop the complete call back function)
<p>I think the issue is relative with queue in Jquery.
We can use clearQueue() to clear queue to stop any animate, however the clear queue cannot stop the call back function
consider this</p>

<pre><code>$("#sth").animate( { width:'100%' }, 2000, function() {
    $("#sth").css("width","0%");
});
</code></pre>

<p>and</p>

<pre><code>$("#sth").clearQueue().css("width","0%");
</code></pre>

<p>is able to stop the animate and push back the width. However, after 2000 miliseconds, it will also turn to 100% width, because of the complete call back function. the function will invoke after 2000 miliseconds no matter whether the queue exists.</p>
