What is the purpose of the event handlers in the JavaScript? code example
Example: events in javascript
//this is an event detector for a mouseclick with Jquery
$('#id').on('click',function(){
yourFunction(args);
});
//this is an event detector for a mouseclick with Jquery
$('#id').on('click',function(){
yourFunction(args);
});