Saturday, July 20, 2019

JavaScript: How to find out which functions are called on event?




I have a problem, there is a website with a load of JS code. When I click on a certain element, some functions are called. How can I find out which functions (and in which files)?




For example, there's something like this



$( document ).ready(function() {
$("a").on('click', function() { $('c').css('opacity', '0.8'); });
$("ul#main li a").on('click', function() { $('c').toggle('.menu'); });
$("nav a").on('click', function() { callSomeFunctions(); });
});


And then I've got a menu like this







How can I find out that those 3 lines above are executed?



Thanks!


Answer



I always use this tool to see what events are linked to DOM elements http://www.sprymedia.co.uk/article/visual+event


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...