Show div after 10 secs and hide after 10 secs

后端 未结 6 1425
[愿得一人]
[愿得一人] 2021-01-17 07:04

I need to show a div (e.g. #mybox) in 10secs after page load, keep it visible for another 10 secs and then hide with a nice sliding in/out effects.

Thanks a lot for

6条回答
  •  失恋的感觉
    2021-01-17 07:40

    May be this way: http://jsfiddle.net/EzvGD/2/

    $(function(){ //-----------------when page loads fire the code below.
      $('#div').delay(10000).show('slow').promise().done(function(){
         $('#div').delay(10000).hide('slow')
      });
    });
    

提交回复
热议问题