Question: My `<form>` submit is not doing anything, I think it's because the action is intercepted by some JQuery code (what else can it be?). In my reasonably complex web application, I can't even find which line of code is intercepting the action -- yes I wrote every line of them, but still I have no idea.

The question is: in general, is there an effective way to trace which piece of JavaScript code is intercepting a designated action?

Answer: 
```
console.log($('form').data('events'));

```

will give you a list of attached events to the given DOM element.

and you could even get the source code of it:

```
$.each($('form').data('events'), function () {
    $.each(this, function () {
        console.log(this['handler'].toString());
    });
});

```
a quick and easy way would be using Google Chrome's developer tools.

* Press `Ctrl`+`Shift`+`I`
* Choose your element.
* Click on the event to see the handler that might be "intercepting" your `submit`

![enter image description here](https://i.stack.imgur.com/q4WTj.png)