How can I delay a plugins execution from a call back?
<p>I've written a lightweight jquery plugin to manage tab switching, it's worked well in development and testing. I've had an odd requirement for one of the tabs to expand in height on opening and then contract the height on closing. The changes are required to be an animation, the opening is easily done using a callback that fires when the tab switching is complete.</p>

<p>I can't however get the closing animation to work, this is due to the plugin continuing and hiding the tab before the animation is complete.</p>

<p>Is there anyway I can force the plugin to pause until a callback function is complete?</p>

<p>The code I'm using to fire the callback is</p>

<pre><code>if($.isFunction(params.click)){
    params.click.apply(this,[content,tab,set]);
};
</code></pre>

<p>I don't really want to go down the road of managing animations in the plugin</p>
