How to interruput ajax request but keep for next possible uses? I want to add simple confirmation box for ajax delete action created via:
ctools_ajax_text_button

JS:

(function ($) {

    Drupal.behaviors.mymod = {
        attach: function (context, settings) {

            Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {

                if ($(this.element).hasClass(Drupal.settings.mymod.confirm_element_class)) {
                    return confirm(Drupal.t('Please confirm your action'));
                }

                return true;
            }
        }
    };

})(jQuery);


It works, but only first time. When I click delete link and choose Cancel option in modal dialog, next clicking doesn't trigger AJAX action at all on this link, so basically makes ajax action inactive.
I've solved it by:

        Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {

            if ($(this.element).hasClass(Drupal.settings.mymod.confirm_element_class)) {
                if (!confirm(Drupal.t('Please confirm your action'))) {
                    this.ajaxing = false;
                    return false;
                }
            }

            return true;
        }