Fade... then delete an element?
I have the following code:
- $('#success').fadeOut(2000);
that obviously fades, it but I also want to delete this element afterwards. However this doesn't work:
- $('#success').fadeOut(2000).remove();
No matter what I do, it either does nothing or deletes the element without first fading. What do I have to do?