f-angi
3/22/2016 - 4:37 PM

simple jQuery pubsub using events

simple jQuery pubsub using events

jQuery.event.trigger('mycustomevent', [arg1, arg2, arg3]);

$(document).bind('mycustomevent', function (e, arg1, arg2, arg3) { /* ... */ });