change material icons entity code on click

change material icons entity code on click

Hello,

I'd like to change a material icon when a button is clicked using jQuery, changing from visibility `<i class="material-icons">&#xe8f4;</i>` to 
visibility_off `<i class="material-icons">&#xe8f5;</i>` and vice-versa clicking again on the button, but I don't manage to toggle entity codes.

```
<button id="toggleVisibilityArchivedAction" class="btn btn-info"><i class="material-icons">&#xe8f4;</i> <span>Show datas</span></button>
```

```
$('#toggleVisibilityArchivedAction').click(function (e) {
   var iElement = $('#toggleVisibilityArchivedAction').find("i");
   if (iElement.textContent == '&#xe8f4;') {
      iElement.textContent = '&#xe8f5;';
   } else if (iElement.textContent = '&#xe8f5;') {
      iElement.textContent = '&#xe8f4;';
   }
```

Thanks for your support