Pergunta de entrevista da empresa eBay

how would you attach an event to an object

Respostas da entrevista

Sigiloso

26 de set. de 2012

I said using bind. He wanted another way

1

Sigiloso

4 de dez. de 2014

You also use .addEventListener or onEvent (ex: oncl1ck, onm0useover etc)

1

Sigiloso

6 de set. de 2015

Using jQuery and the .on() method with a click event listener: $('body').on('click', '#objectId', function() { // this says within the body, upon a click event on the ID objectId, run this code... });