Home>Support>Site origin admin events

Site origin admin events

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!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 10 months ago Alex S
    Hi, I Work Here

    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:

    $(window).on( 'load_panels_data' function(e) {
        // add your code here.
    } );
    

    If that doesn’t work, can you please elaborate on what you’re trying to do? I can help by providing direction.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More