How can I find out from firebug which method or methods are attached to the click event handler of a button?
This is the code of the button
<button class="rsmg_button_save ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-state-focus" type="button" role="button" aria-disabled="false" style="display: inline-block;"><span class="ui-button-icon-primary ui-icon ui-icon-disk"></span><span class="ui-button-text">Save</span></button>
If function is attached using jQuery, you can see it using firebug.
jQuery events are stored using
datamethod and with key asevents.So
$("desiredSelector").data("events")will show up all events attached to that particular element.For details check this link.
For event defined in Javascript you can check the
onClickproperty or use the method suggested by jfriend00.EDIT :
There is a jQuery plugin which make this more simple.