Saff
Saff

Reputation: 559

slide down and delay in jquery

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.net/2sMFn/3/
Anyone knows what i'm doing wrong?
Thanks in advance..

Upvotes: 2

Views: 3383

Answers (3)

Nishu Tayal
Nishu Tayal

Reputation: 20880

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

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

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

Upvotes: 1

sQVe
sQVe

Reputation: 2015

Try this:

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

Upvotes: 3

adeneo
adeneo

Reputation: 318342

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

Upvotes: 5

Related Questions