makerofthings7
makerofthings7

Reputation: 61463

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

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?

Upvotes: 0

Views: 67

Answers (2)

Mr.G
Mr.G

Reputation: 3559

Check this:

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

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

});

Upvotes: 0

Aditya Singh
Aditya Singh

Reputation: 9612

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.

Upvotes: 1

Related Questions