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.
Right-click the element. In the context menu, Click 'Inspect Element' If there is an 'ev' icon next to the element (yellow box), click on 'ev' icon. Displays all events for that element and event handler.
The buttonPressed() callback function will have a returned event object which has all the data about the HTML element that is clicked on. To get the clicked element, use target property on the event object. Use the id property on the event. target object to get an ID of the clicked element.
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.
simply execute jQuery('#elem_id').data('events');
in the firebug console
, it will list all the events
bound
to the elements
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With