views:

217

answers:

1

I'm working with someone else's code, and I want to be able to see what JavaScript they have tied to a particular button on the page. Is there some way to watch what code is being fired off by clicking the button in FireBug or something?

+5  A: 

Give Visual Event a try. It's a bookmarklet that will highlight all Elements in a page with events bound to them and will give you a nice little readout on what's bound to each Element.

ajm
+1 nice tool, was searching for something like that.
Amr ElGarhy
+1, wow, this is a really nice tool, it even tells you what frameworks loaded the code.
altCognito
That's very nice. Now if there were just a way to see where you can find the code -- if it's in an external .js file or if it's inline on the page, etc.I'm thinking of the way Firebug will show you all the CSS that generated a part of the page including all the styles applied to it, both inline and from external .css files and what lines those rules can be found.
Trey Piepmeier