0

jQuery find events handlers registered with an object asks about how to list event handlers registered with an object.

How do I list what events are available for an element I can add an event handler to?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
  • Possible duplicate of http://stackoverflow.com/questions/3910123/list-of-an-elements-events ? – Roko C. Buljan Jan 27 '16 at 00:13
  • Just out of curiosity, why would you do that? – Roko C. Buljan Jan 27 '16 at 00:14
  • @RokoC.Buljan I tried adding an event handler responding to an input element being clicked, but I found that didn't really meet my needs because I need to handle the user submitting a file they've chosen, rather than bringing up the file selection interface. So I'm trying to work out what event would be more suitable. – Andrew Grimm Jan 27 '16 at 00:23
  • Than you need to use `event.stopPropagation()` on the clicked element (that way the click won't propagate to the (I suppose) parent element that calls the file select interface.) – Roko C. Buljan Jan 27 '16 at 00:27

0 Answers0