Ebisu : Event-based Inter-serving Units
Ebisu project aims for implementing "custom events" handler in JavaScript.
To define a handler of an event identified by "foobar" on the element select by "#e1", you say:
Ebisu("foobar").to("#e1").attach(function() { alert(42); });
This shows an alert message when "foobar" event happened. To tirgger an event manually, you say:
Ebisu("foobar").trigger();
Calling this will give you the alert(42) popup that you just defined. To un-subscribe an event from elements, you say:
Ebisu("foobar").to("#e1").detach();
It can also be used as a jQuery extension:
// Change all div's innerHTML to BANG when it bangs $("div").Ebisu("bang").attach(function() { $(this).html("BANG"); })
That's should give you the basic idea of what's it doing. Read EbisuTutorial too. To completely understand it, read its source code by now.