Javascript Post Request Twice

Written by Arvind

I went nuts yesterday. I’m trying to figure out why my click event is triggering twice. I have a modal with send button, that button has and click function to post data, for some reason the event triggers twice, using e.preventDefault() and e.stopPropagation() doesn’t work. It took me a while to find the answer. Using the code below, works for me. I hope it works for you too.

e.stopImmediatePropagation();