jquery: bind 2 events
<p>I have a div called MyDiv. How do I call 2 functions one after the other when the user clicks it? </p>

<pre><code>$('#MyDiv').click(function () {action1()//wait until it finishes and call action2
</code></pre>

<p>Action1 is a function in a script that's loaded in my master page and action2() is a small inline script function that's different in every page which means I can't call action2 from action1 because the name action2 will actually be different on every page. </p>

<p>Thanks.</p>
