Posted By

dnnsldr on 08/23/12


Tagged

jquery notification fade


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Priestd09


Fading out a div after set time with jQuery


 / Published in: JavaScript
 

URL: http://papermashup.com/jquery-fading-a-div-after-a-certain-time/

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. });
  6.  
  7. }, 2000);
  8. });

Report this snippet  

Comments

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 http://techtutorz.blogspot.in/2014/04/delaying-fadein-fadeout-effect-on-in.html

You need to login to post a comment.