Posted By

jamesming on 11/19/08


Tagged

jquery


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

benrudolph
ETbyrne
ntulip
acristic
Hollow
seanpowell
Balamir


jQuery Delay Plugin


 / Published in: JavaScript
 

URL: http://www.evanbot.com/article/jquery-delay-plugin/4

  1. // Wait for #link to be clicked...
  2. $("#link").click(function(){
  3.  
  4. // Delay 1 second...
  5. $(this).delay(1000,function(){
  6.  
  7. // Then display #hello
  8. $("#hello").css("display","block");
  9.  
  10. // Then delay another 3 seconds...
  11. $(this).delay(3000,function(){
  12.  
  13. // Change text color to blue
  14. $("#hello").css("color","blue");
  15.  
  16. });
  17. });
  18. });

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: ETbyrne on November 29, 2008

Thanks for posting my script!

You need to login to post a comment.