Samantha J T Star
Samantha J T Star

Reputation: 32758

How can I find out what events are attached to HTML elements?

I would like to understand more about jQuery and I'm finding one thing I would like to do is to be able to find out what events are attached to elements. Is there some way using the debugger in IE or Firebug that I can find this out. I don't mean by looking at the source code. What I would like to do is to see events in the same way as I can check out CSS properties with firebug.

Upvotes: 6

Views: 1340

Answers (3)

marcio
marcio

Reputation: 10512

You can see it with Opera Dragonfly too, just inspect the element and go to properties tab on the inspect sidebar:

Dragonfly screenshot

Upvotes: 0

dku.rajkumar
dku.rajkumar

Reputation: 18568

simply execute jQuery('#elem_id').data('events'); in the firebug console, it will list all the events bound to the elements.

Upvotes: 3

jcreamer898
jcreamer898

Reputation: 8189

Try FireQuery for FireFox

http://firequery.binaryage.com/

When you inspect the elements in FireBug, it shows you all of the events attached to the element.

Upvotes: 6

Related Questions