How can I attach JS to my custom panel widget?
I have a list of links, inside that panel, which should have onclick eventlisteners + handlers attached to them.
Thx!
How can I attach JS to my custom panel widget?
I have a list of links, inside that panel, which should have onclick eventlisteners + handlers attached to them.
Thx!
You can include your script in the widget template.
Indeed, I tried to return it from the return array ‘html’ key. I replaced that with with tpl::load to load a separate file and included javascript there.
Thanks!