After 3 seconds… the alert prompted does not show up. What am I doing wrong?
$(function() {
$("#test").live("click",function() {
$("#test2").delay(3000, function({
alert('Hello!');
}) );
});
});
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.
.delay()doesn’t accept a callback. UsesetTimeout.I could show you how you could technically make it work with
.delay(), but given your example, it just wouldn’t be appropriate.