I have a click that triggers payment. I'm using the .One method to disallow further clicking, but in case the payment comes back declined I'd like to re-enable the click for another try - one time again of course. And let this re-occur in case of another decline.
$(".pay").one("click", function(event){
...//payment code executes
});
Ajax
$.ajax({
...
success: function(data){
$('.pay').html(data); //comes back declined. Re-enable .one click again.
}