I'm struggling to figure out how to change the icon of a toggled collapsible element. I have been reviewing their documentation but am having trouble making it work as intended.
$('.collaps_roles_permission').collapsible({
accordion: true,
onOpen: function(el){
//$('li.roles_icon', this).html('remove');
console.log(el);
console.log(el[0]);
},
onClose:function(el){
//switch back icon to normal
}
});
Is there a way to modify the collapsible header when it is toggled?
<div class="collapsible-header">
<i class="material-icons roles_icon">add</i>
{{ $r->display_name }}
</div>