reglib 1.0.4 released
reglib is up to 1.0.4. Some bugs are fixed and some features are added since the 1.0 release:
- new x-browser event function
removeEvent() - new x-browser event function
cancelBubble() - now supports event delegation with mousedown, mouseup, and dblclick
- now supports multiple class selection, e.g.
.foo.bar
Here's an example of removeEvent():
var el = reg.gebi('myid');
// mem is just an id
// similar to that returned by setTimeout()
var mem = reg.addEvent(el, 'click', function(e){
// do stuff here
});
// later on, remove the event
// similar to clearTimeout()
reg.removeEvent(mem);
Personally, I don't use these direct-attachment functions very much because I prefer to use reglib's built-in event delegation, but it's nice to have them around.
More info: all reglib posts, reglib feed, download reglib