IfnotFr / PopConfirm

A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AJAX request inside of binded click event - adds one extra after each click

iliajie opened this issue · comments

If you're using inside of onclick event some AJAX request, then with every new click it adds an extra request. So, if you click the button with popConfirm once, all is fine. If you click it second time, then two requests are sent to the server, third time, then there are already three requests are going to the server and so on. I think, something should be destroyed or scoped locally. If I have a chance to debug it, I will post back. Thanks!!

Seems that @thierrydussau found a fix for it. #6

Ok thanks, same comment for #6 , #10 should fix your problem too, can you confirm ?

Yes, after merging suggested pieces of code, I stopped having issues. Thanks for your work, pal!

Closing problem with fix merge.