title: How to detect when content of a span element changes
body: <p>Lets say I have <code>span</code> as follows <code>&lt;span id='myId'&gt;content before change&lt;/span&gt;</code></p>
  
  <p>I need an event something like </p>
  
  <pre><code>$('#myId').contentChanged(function(){
     alert( 'New content: ' + $(this).text() )
  })
  </code></pre>
  
  <p>So when I change the content of the span as follows</p>
  
  <p><code>$('#myId').text('content after change')</code></p>
  
  <p>the <code>contentChanged</code> event above fires. It should be rather efficient performance wise, because in my case there could be hundreds of them being monitored.</p>