jQuery: How can I detect if the html has changed within a given element?
<p>In javascript, possibly using jQuery, how can I detect if the html content of a given element has changed?</p>

<p>I'd like to be able to do somthing like:</p>

<pre><code>$('#myDiv').change(function(){
  // do some stuff
});
</code></pre>

<p>I am basically trying to detect if given elements are being added to the div or if the inner html of given elements (such as labels) has changed and then hide or show the div depending on the content. </p>

<p><strong>Any alternative idea about how to achieve smt like this is also appreciated</strong>.</p>

<p>I am hoping I won't have to revert to some obscure plugin to do this!</p>

<p>NOTE: this needs to work at least in IE8!</p>
