Do some when DIV content changes

Do some when DIV content changes

Trying to do something when the content of a DIV changes and the new content is an "O" but it does not seem to work for me. My code looks like below. Any Ideas on how I can solve this problem.


  1. jQuery('.select2-chosen').bind('DOMSubtreeModified',function(event) {
  2.     var newText = $(this).text();
  3.     alert(newText); 
  4.     if ($('.select2-chosen:contains("O")').length === 1) {     
  5.     alert(newText);
  6. }
  7.     
  8.     
  9.     
  10. });

It is the minum height inches field on this page