How to fire an jquery action when a div is appended?
<p>I need to fire an jquery action when a div is appended.</p>

<p>Something like: </p>

<pre><code>if ($('div#myDiv').is_appended()) {
console.log('the div has been appended');
}
</code></pre>

<p>Is this possible?</p>

<p><strong>Why do I need this</strong></p>

<p>This question is related to this <a href="http://stackoverflow.com/questions/15083511/how-to-execute-jquery-inside-a-modal-window">question</a> where I have I modal div which is loaded after the jquery library, then I can't target the element in it. </p>

<p>Now I'm trying to do something when the modal div is load, not sure if I get it done though,</p>
