fixed webkit error be disable a button

This commit is contained in:
Oskar Hahn 2012-04-15 12:40:35 +02:00
parent 4d7940cb12
commit ae5c6b84a8

View File

@ -1,9 +1,13 @@
$(function () { $(function () {
$('.button').click(function () { $('.button').click(function (event) {
button = $(this); button = $(this);
button.attr('disabled', 'disabled'); if (button.hasClass('disabled')) {
setTimeout(function () { event.preventDefault();
button.removeAttr('disabled'); } else {
}, 1000); button.addClass('disabled');
setTimeout(function () {
button.removeClass('disabled');
}, 1000);
}
}); });
}); });