This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Site origin admin events

7 years ago · Last reply by Alex S 7 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Alex S Staff 7 years, 3 months ago

    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.

Have a different question or issue?

Start New Thread