Why the following code doesn’t work? I want that input would be disabled for a one second and then it would go normal again.
$('#chat_bg').attr('disabled', true).delay(1).$('#chat_bg').attr('disabled', false);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Aside from the syntactically invalid JavaScript, and the fact that
.delay()interprets the argument as milliseconds, not seconds:.delay()only affect theeventsqueue by default, which.attr()does not interact with.Keep it simple, and just use
setTimeout.