IfnotFr / PopConfirm

A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover
MIT License
99 stars 35 forks source link

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

Closed iliajie closed 10 years ago

iliajie commented 10 years ago

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!!

iliajie commented 10 years ago

Seems that @thierrydussau found a fix for it. https://github.com/Ifnot/PopConfirm/issues/6

IfnotFr commented 10 years ago

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

iliajie commented 10 years ago

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

IfnotFr commented 10 years ago

Closing problem with fix merge.