if an element is removed using
$('.notification').remove();
How do we create it back.
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 can’t get that particular instance back. Using
$.remove()removes it from the DOM. You can create a clone of it, move it around the DOM, hide it, etc., though. Depending on what your project requires, you likely have many other options.If you’re not too interested in that particular instance, you can create a new one. Suppose that was a div with a statement:
If you want to keep a copy of that particular element around, you can
$.clone()it and remove the original: