Reputation: 11751
I am using bootstrap modal, I dont know where I have put the js code that triggers the modal after clicking the button.
jQuery('#signin').modal('show');
I checked each file...even checked each JS file in source in browser.
How can I find which code is triggering the event in browser when I am clicking the button to open a modal?
Upvotes: 0
Views: 251
Reputation: 94479
Use a developer tool for a browser which will allow you to perform Javascript debugging. Your best bet is most likely Firebug. If you set a debug point at a line within a JS file, firebug will allow you to inspect the stack to see which line has called the function.
Instructions
Searching for Script in Firebug
If you click the script tab you can enter a known piece of the script in the upper right hand corner of firebug, this should take you to its location in the code.
Upvotes: 4
Reputation: 8080
I agree with Kevin, another option is to print the stack trace using something like: http://www.codeovertones.com/2011/08/how-to-print-stack-trace-anywhere-in.html
Upvotes: 1