Determine when DOM Loaded : <p>I am in need of some JS assistance.</p>

<p>I need to run some code after the DOM was updated.</p>

<p>For example: when I click a button, it fires a function. I need to run that function code and when the DOM is fully updated, run some more code. How could I go about doing this in a clean fashion?</p>

<p>I am sure this is relatively simple but I am drawing blanks. I am using jQuery.</p>

<pre><code>$('.btn').click(function() {
    do some stuff

   // then ensure dom has fully updated and do some more????
})
</code></pre>
