title: Do something when div content changes to a given value
body: <p>I am Trying to do something when the content of a DIV changes to an "O", but it does not seem to work for me. </p>
  
  <p>My code looks like below. Any Ideas on how I can solve this problem :</p>
  
  <pre><code>jQuery('.select2-chosen').bind('DOMSubtreeModified', function(event)
  {
      var newText = $(this).text();
      alert(newText); 
      if($('.select2-chosen:contains("O")').length === 1)
      {
          alert(newText);
      }
  });
  </code></pre>