This version is old school.
Please find jQuery plugins on npm.
jQuery.channel - smart pub/sub
jQuery.channel is a complete pub/sub implementation build on top of jQuery.Callbacks. It preserves the jQuery-chain! $('div').channel('subscribe' ... ) and you can use regular expressions (containing*) as wildcards begining on the starting position within the string. So it's possible to subscribe to multiple channels with just one call: $.channel('subscribe','CHANNEL/SUB.*',myFunction)