Hi. I’m trying to use the inbuilt interactions menu for an icon box, so that a javascript snippet is run when the box is clicked. How can I achieve this?
Not sure you can, but you can do it js like this
document.querySelector('.my-custom-class').addEventListener('click', ()=> { custom_function(); })
No need. Just add an attribute to the icon of ‘onclick’ -
1 Like