0

Event listeners and event handlers in JavaScript

what's the difference between an event listener & an event handler? and what's wrong in the below code? https://code.sololearn.com/WIvNjPGLRqRB/?ref=app

29th Nov 2018, 4:34 PM
Ravindra Desai
Ravindra Desai - avatar
2 Antworten
+ 3
What's wrong in your code is that if you want to use the JQuery library you must load it in the <head> section of your html (before the code where you want to use it): <script src="https://code.jquery.com/jquery-3.1.1.js"></script> Anyway, the difference between event listener and handler is that the event listener is the system on wich you attach/assign an handler function... often both term are used without making the sligthly difference ^^
29th Nov 2018, 6:34 PM
visph
visph - avatar
29th Nov 2018, 4:42 PM
Seniru
Seniru - avatar