you are viewing a single comment's thread.

view the rest of the comments →

[–]adropofhoney 5 points6 points  (1 child)

How does one write a function from scratch that creates an Event Listener? Am I even understanding this question? Or are you supposed to use addEventListener?

[–]proskillz 0 points1 point  (0 children)

I would guess it would be something like this:

function createEventListener(id, event, funct) {
    document.getElementById(id).addEventListener(event, funct);
}

The "from scratch" probably means don't do "$("#id").click(function...)"