I am wondering how can I hide/remove a tag after a certain amount of time. Is there some built in thing or do I do use threading(if javascript can do this?)
Share
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.
You don’t even need jQuery for the “5 seconds” part: JavaScript’s built-in
setTimeoutfunction will do the trick. Incorporating jQuery for the DOM manipulation, you get:Here the
5000represents 5000 milliseconds, or 5 seconds. You can passsetTimeoutan existing function or (as in this case) an anonymous function.