This plugin adds bubbling functionality to jQuery. The code is similar to jQuery.fn.trigger’s because it’s meant to extend it. It also generates it’s own event object, that will remain untouched through the bubbling, meaning it’s safe to attach attributes to it and grab them with the ancestors while the event bubbles up. I tried to use jQuery’s core functions as much as possible, but most functions I needed were not compatible, and would destroy the custom event object, still the code remains short.
NOTES: