Question: I use the 3.2.1 version of the jquery.min.js

I have this in my code:

```
$('#damage1').bind("DOMSubtreeModified",function(){displayIcons();});

```

But this line causes an error in my console on Firefox:
"Use of Mutation Events is deprecated. Use MutationObserver instead."

Fair enough.

In the documentation I see this as the new syntax:

```
new MutationObserver(function callback);

```

But, really, with my basic coding level, I don't know much what to do of it in order to replace my deprecated line efficiently.

Any help would be appreciated.

Answer: 
DOMSubtreeModified is now depreciated. Below code using MutationObserver should solve your issue.

```
   $(function() {
   var observer = new MutationObserver(function(e) {displayIcons();});
   observer.observe($('#damage1')[0], {characterData: true, childList: true});
   });

```
The DOMSubtreeModified has been deprecated. 

```
// Select the node to observe for changes
var targetNode = document.getElementById('#damage1');  
// targetNode = document.querySelector('#myTable tbody');

// set which changes to observe 
var config = { attributes: true, childList: true, subtree: true };

//create callback function to execute when changes are observed
function diplayIcon(){
    //do something
    alert("mutation observed");}

//Create an observer instance linked to the callback function
var observer = new MutationObserver(displayIcon);

// Start observing the target node for configured mutations(changes)
observer.observe(targetNode, config);

// Later, you can stop observing
//observer.disconnect();

```