jquery events binding

jquery events binding


Hi all,
I propose to add the following new feature in events binding :
var o = {
start : new Function(),
stop : new Function()
}
// Will be the same as
// $(target).bind( 'example.start', o.start );
// $(target).bind( 'example.stop', o.stop );
$(target).bind( 'example', o );
$(target).triggerHandler( 'example.start' ); // Will call start
function
It is very easy to implement, and would simplify interface. After
that, I would be great to normalize all components with the
following :
$(target).myComponent( {
events : {
start : new Function(),
stop : new Function()
},
myOtherParam : 'value'
}
As jquery supports namespaced events, it should support it fully.
Best regards,