tknakatsu
2/28/2018 - 6:30 AM

preventDoublePost

prevent double submit post in form

function preventDoublePost($form) {
    $form.on('submit', function () {
        var self = this;
        $(':submit', self).attr('disabled', 'disabled');
        setTimeout(function () {
            $(':submit', self).removeAttr('disabled');
        }, 10000);
    });
}