slide down and delay in jquery

后端 未结 3 1806
悲&欢浪女
悲&欢浪女 2021-01-15 12:21

I\'m trying to make an hidden div slide down on the click of a button and also wait for about five seconds before sliding back up. I\'ve tried the delay() but i don\'t know

相关标签:
3条回答
  • 2021-01-15 12:54

    Try this:

    $this.delay(5000).slideUp(6000);
    
    0 讨论(0)
  • 2021-01-15 13:02

    You're on the right track, but you have to change this:

    $this.delay(5000).SlideUp(6000);
    

    to this

    $this.delay(5000).slideUp(6000);
    

    as it's slideUp whithout the capitol "S" ?

    FIDDLE

    0 讨论(0)
  • 2021-01-15 13:12

    following is the DEMO: http://jsfiddle.net/2sMFn/19/

    function name is 'slideUp()' instead of 'SlideUp'. So use this :

     $this.delay(5000).slideUp(6000);
    ​ 
    
    0 讨论(0)
提交回复
热议问题