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"></i>` to
visibility_off `<i class="material-icons"></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"></i> <span>Show datas</span></button>
```
```
$('#toggleVisibilityArchivedAction').click(function (e) {
var iElement = $('#toggleVisibilityArchivedAction').find("i");
if (iElement.textContent == '') {
iElement.textContent = '';
} else if (iElement.textContent = '') {
iElement.textContent = '';
}
```
Thanks for your support