14 lines
350 B
JavaScript
14 lines
350 B
JavaScript
$(function () {
|
|
$('.button').click(function (event) {
|
|
button = $(this);
|
|
if (button.hasClass('disabled')) {
|
|
event.preventDefault();
|
|
} else {
|
|
button.addClass('disabled');
|
|
setTimeout(function () {
|
|
button.removeClass('disabled');
|
|
}, 1000);
|
|
}
|
|
});
|
|
});
|