I’m trying to execute some javascript when Site Origin panels open to make it compatible with our plugins. I see that you trigger some events in backbone like for example:
if ( _.isUndefined( data.grid_cells ) ) { this.trigger( 'load_panels_data' ); return; }
But I can’t seem to add a listener to that event. The only reference I found on the forums if from other developer requesting events 3 years ago, but the thread is closed without updates.
Could you shed some light on this?
Thanks!
Hi Damian,
Triggers are events so you’ll need to add a listener.
If you’re using, for example, jQuery, that’s done by using:
If that doesn’t work, can you please elaborate on what you’re trying to do? I can help by providing direction.