jquery - write a function to allow for a callback?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3888488/javascript-callback-programming">Javascript callback programming?</a>  </p>
</blockquote>



<p>A lot of jquery functions allow for a callback. Most are in a syntax like:</p>

<pre><code>$('.selector').slideUp('fast', function(){
    alert('slideUp has completed');
});
</code></pre>

<p>If I'm writing my own function, how can I make sure it is finished before the one after it is called (i.e. provide a callback parameter)</p>
