(function ($) {
$(document).on('click', 'button,input[type="button"],input[type="submit"]', function () {
this.disabled = true;
});
$(document).on('click', 'a', function (e) {
window.location.href = this.href;
this.href = '#';
});
}(jQuery));