Posted By

dnnsldr on 08/23/12


jquery notification fade

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Fading out a div after set time with jQuery

 / Published in: JavaScript


Here’s a handy bit of code that I use quite regularly, its particularly useful if your getting a response message from a form to notify the user that there data was sent, or comunicate an error and you want to fade the message out after a set time.

  1. $(document).ready(function(){
  2. setTimeout(function(){
  3. $("div.mydiv").fadeOut("slow", function () {
  4. $("div.mydiv").remove();
  5. });
  7. }, 2000);
  8. });

Report this snippet  


RSS Icon Subscribe to comments
Posted By: rexAnton on April 30, 2014

hey its an good post ,i liked it so i would like to share one more link that too work very much fine

You need to login to post a comment.