C
C
Crash2014-05-15 13:32:40
JavaScript
Crash, 2014-05-15 13:32:40

How can I quickly find the required js script by html tag?

It happens like this: a bunch of scripts are hung on the project page. I need to track its handler for any specific html tag, which script works with it. How can this be done quickly, for example, in WebStrom or Sublime?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-05-15
@Bandicoot

in chrome, in the debug panel, you can: view all event handlers on an element (not very helpful when using jQuery), or put a break on changing the dom element, and thus find the code that actually changes this element.
And since there are a lot of ways to hang events without writing tags, or a lot of options for recording a selector, you can only find something simple by simply searching through the code.

N
Nikolai Sadovnikov, 2014-05-15
@GruZZ

If I understand the question correctly, the Visual Event bookmarklet will help you.

Y
youlose, 2014-05-15
@youlose

Wrong question, IDEs work with sources, not tags. You can track the change in the browser through the "development console", for firefox I use firebug, browsers with the webkit engine have their own good ones. The console is called by F12. Then you do "inspect element" with the help of the right button on the desired element on the site. And in the panel with the DOM tree, right-click on the selected element and there is something like "stop when adding / removing a child", well, in general, try what options there are.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question