How can I tell which event fires when I click on an HTML object?

94 views Asked by At

I'm trying to download and re-use the phone simulator here, and I want to find the javascript that allows me to switch devices in the "OS Simulator mode".

Right now I have a local instance working, but the page isn't refreshing as it should be. I tried the Javascript console in chrome but I don't see any events " fly by " as I click on the object and wait for something to happen in the F12 window.

How do I get the event name for the Javascript that should be firing?

2

There are 2 answers

0
Aditya Singh On

Add the below code snippet:-

function eventLogger(e) {
    console.log(e);
}

$(document).bind("click keydown keyup mousemove", eventLogger);

you can add/update the bind events to get log on additional events you want to capture.

0
Mr.G On

Check this:

$("*").click(function(){

       alert($(this).prop("tagName"));

});