Posted By

BlueIceStudios on 01/17/11


Tagged

jquery delay timer effects setTimeout


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

Sereniel
qubestream
dubogii
spee66


jQuery Delay with Effects


 / Published in: jQuery
 

URL: http://www.blueicestudios.com

if you are using jquery 1.4 you can simple do

  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3. $(".trigger").click(function(){
  4.  
  5. $(".panel").show("fast").delay(2000).hide("fast");
  6.  
  7. });
  8. });
  9. </script>
  10.  
  11.  
  12. //You can change the delay time "1000 = 1 sec" and effect with
  13.  
  14. //slide effect
  15. $(".panel").slideDown("fast").delay(4000).slideUp("fast");
  16.  
  17. //fade effect
  18. $(".panel").fadeIn("fast").delay(2000).fadeOut("fast");

Report this snippet  

You need to login to post a comment.