title: Detect Label Change Using - jQuery
body: <p>I have a lookup field so based on the drop down change the lookup field value changes </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var name;
  $("#tdf_15").on('DOMSubtreeModified', function () {
     name =  $(this).html();
     alert(name);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="tdf_15" class="cell dc" style="background-color: rgb(255, 253, 221);"&gt;Dileep Thomas&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So this snippet will alert whenever the lookup field changes , but the alert is working for three times initially when the field is blank and once it is have a value then alert will work for four times at each time we change the drop down. I need to have the alert for only one time also i need to check the value in the variable(<strong>name</strong>) is changed or not.</p>
  
  <p>Many thanks in advance if anyone can help me !!  </p>