Reputation: 9381
I'm working on a drupal module (irrelevant) and I'd like to recreate a javascript/jQuery event. If I use chrome and go to event listeners I see the jQuery script is called on line 57, however this doesn't really help as:
The reason is that I'd like to recreate this (ajax probably) call:
So does anyone know of a trick like a chrome plugin or something? It could shave a lot of time for me.
Upvotes: 5
Views: 135
Reputation: 13928
If you are setting a correct breakpoint then you should be getting a Call Stack
on the Source
Tab, on the right hand side. There you should be able to track down the file which initiated the call.
And as they say, a picture speaks a thousand words..
And to further elaborate on your question,
It is always advisable to use an uncompressed jQuery.js (Or for that matter any .js) during the development, as you might have already figured out.
Steps for someone new.
jQuery.min.js
or whatever is currently being loaded, so It will work as a drop in replacement.Upvotes: 6
Reputation: 2871
Try chrome devtools, for example:
Sources -> Event Listener Breakpoints (to the right) -> Mouse -> click
Upvotes: 0