最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - slide down and delay in jquery - Stack Overflow

programmeradmin1浏览0评论

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 if i'm not implementing it right. Also and when the div isn't hidden it just displays the image.
I have this so far /
Anyone knows what i'm doing wrong?
Thanks in advance..

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 if i'm not implementing it right. Also and when the div isn't hidden it just displays the image.
I have this so far http://jsfiddle/2sMFn/3/
Anyone knows what i'm doing wrong?
Thanks in advance..

Share Improve this question asked Aug 24, 2012 at 15:04 SaffSaff 5591 gold badge10 silver badges21 bronze badges 1
  • 1 It should be slideUp not SlideUp... – Jerryf Commented Aug 24, 2012 at 15:10
Add a ment  | 

3 Answers 3

Reset to default 5

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

Try this:

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

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

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

 $this.delay(5000).slideUp(6000);
​ 
发布评论

评论列表(0)

  1. 暂无评论