Custom jQuery Events — Window Broadcast Event

PHOTO EMBED

Sat Mar 19 2022 13:37:06 GMT+0000 (UTC)

Saved by @mboljar #html #javascript

$(window).trigger('broadcast.greatAddon', { maxVolume: 11 });
$(window).on('broadcast.greatAddon', function(msg) {
  console.log(msg.maxVolume);
});
content_copyCOPY

https://docs.expressionengine.com/latest/development/control-panel-js/events.html