jQuery Delay with Effects


/ Published in: jQuery
Save to your folder(s)

if you are using jquery 1.4 you can simple do


Copy this code and paste it in your HTML
  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");

URL: http://www.blueicestudios.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.