/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Wait for #link to be clicked... $("#link").click(function(){ // Delay 1 second... $(this).delay(1000,function(){ // Then display #hello $("#hello").css("display","block"); // Then delay another 3 seconds... $(this).delay(3000,function(){ // Change text color to blue $("#hello").css("color","blue"); }); }); });
URL: http://www.evanbot.com/article/jquery-delay-plugin/4