i interested in learn how to correctly add .bind code to object, then he changed. This object is not unic and have class selector insted of id, but it have a <div>
wrapper:
<div id="GDI">
<table class = "Tiberium">
...
<tbody>
<tr>...</tr>
...
<tr>...</tr>
</tbody>
</table>
</div>
<div id="NOD">
<table class = "Tiberium">
...
<tbody>
<tr>...</tr>
...
<tr>...</tr>
</tbody>
</table>
</div>
The data changed in table with class "Tiberium" in <tbody>
space (e.g. was added new row), i need simple alert then data changed in GDI table, but dont know how to do it.
Code that i tried:
$('.Tiberium').bind('DOMSubtreeModified', Alert);
Where Alert is function. This code capture changes in both tables, and i got alerts then one of them changed. So how i can track changes only in "Tiberium" table in GDI space?
p.s. i'v tried $('#NOD').bind('DOMSubtreeModified', Alert);
but this code alert me 3 times in row, and it possible run every code in function 3 times. (i think it happend in case of this hierarchy).