Event manipulator for td?

1

Galera, first a good day.

Well, I'd like to know if it's possible to create a handler in case a -td- should be modified.

Example. I have the following code:

<table>
  <tr>
    <td>Olá</td>
  </tr>
</table>

When td is modified, activate an event handler. I tried using .on ('change') , but it seems to work only for inputs, textarea, checkboxes ...

Can anyone help me?

Thank you in advance!

    
asked by anonymous 21.07.2016 / 13:10

1 answer

0

Look, to manipulate this type of element, I recommend using the bind function of jquery in the modified element.

When the element is modified, you can call a callback to do what you want after that element is modified. Example:

$('td').bind("DOMSubtreeModified", function(){
  alert('changed');
});

Source: link

    
21.07.2016 / 13:50