my version of the popular addEvent()
Ok, so here is my version of the popular addEvent() javascript function.
usage:
event_listener.add( object, event_type, function );
Example:
function init() {
alert(”the page is fully loaded”);
}
event_listener.add(window,”onload”, init);
-OR -
event_listener.add(window, “onload”, function init() {
alert(”the page is fully loaded”);
});
Then you can also remove events as well. Remove them in the same manner you created them. Like [...]