4

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?

1

1 Answer 1

10

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.

Sign up to request clarification or add additional context in comments.

2 Comments

+1, wow, this is a really nice tool, it even tells you what frameworks loaded the code.
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.