defining callback functions in javascript for all event types

defining callback functions in javascript for all event types

When using addEventListener you must remove the on prefix from the event name.

You can do this with:

occurances[occurances.length] = i.substring(2);

See http://jsfiddle.net/alnitak/3u6eQ/

defining callback functions in javascript for all event types

Leave a Reply

Your email address will not be published. Required fields are marked *