I need to detect the changes made in the td of my table sending an alert, greetings thanks.
setTimeout(function(){
$('td[name$=total]').text("12345");
}, 3000);//hago el cambio en todos los td al pasar cierto tiempo
//busco todos los td que terminen con el nombre total
$('td[name$=total]').on(function(){
alert('el codigo ha cambiado');
});//necesito detectar el cambio en el td mandando un alert en una funcion onchange
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<table id="table">
<thead>
<tr>
<th>Codigo</th>
<th>Cantidad</th>
</tr>
</thead>
<tbody>
<tr id="1"><!-- tabla se contruye dinamica-->
<td name="TjnDT78BQtotal">4859</td>
<td>2</td>
</tr>
<tr id="2">
<td name="KT78df8DKtotal">2568</td>
<td>4</td>
</tr>
<tr id="3">
<td name="TjnDTjgBQtotal">4859</td>
<td>5</td>
</tr>
<tr id="4">
<td name="CT77gfjkKtotal">2568</td>
<td>1</td>
</tr>
</tbody>
</table>