fixed webkit error be disable a button
This commit is contained in:
parent
4d7940cb12
commit
ae5c6b84a8
@ -1,9 +1,13 @@
|
||||
$(function () {
|
||||
$('.button').click(function () {
|
||||
$('.button').click(function (event) {
|
||||
button = $(this);
|
||||
button.attr('disabled', 'disabled');
|
||||
setTimeout(function () {
|
||||
button.removeAttr('disabled');
|
||||
}, 1000);
|
||||
if (button.hasClass('disabled')) {
|
||||
event.preventDefault();
|
||||
} else {
|
||||
button.addClass('disabled');
|
||||
setTimeout(function () {
|
||||
button.removeClass('disabled');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user