how can i chain these functions so that when once completes, the next fires?
<p>If I have a div that I clear the contents of, but then want to put something new in it's place, how can I string these functions so that one only fires after the previous one completes</p>

<pre><code>$('#nner_container').fadeOut(300, function(){

    $('#header_div').after('&lt;div id="inner_container" style="dispay:none"&gt;&lt;/div&gt;');
       //when this insertion of inner_container completes, fill it with some content
       //and when that completes, fadeIn inner_container

});
</code></pre>

<p>most jquery functions seem to take additional functions as a final parameter, which I thought was used for exactly this purpose. But not so with <code>after()</code>. Or am I doing something incorrect.</p>

<p>Thanks</p>
