jQuery event listener for when text has changed in a <td> cell? -


is there way in jquery attach listener cell when text inside cell has changed (by javascript, not user), event triggered?

to extend mway's answer, here code.

var td = $('#my-table tr td:eq(1)'); var tdhtml = td.html(); setinterval(function() {      if (td.html() !== tdhtml) {          // has changed          tdhtml = td.html();     }   }, 500); 

... , second suggestion.

function updatetd(html) {      $('#my-table tr td:eq(1)').html(html);       // additional code } 

you bind domsubtreemodified event element, browser support isn't best.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -