Reputation: 7077
This is very weird. I have a div and I want that div to slideDown in 5 seconds. So I'm using this script:
$('.land_leadform').hide(0).delay(5000).slideDown(5000);
If I use .delay(5000)
the animation doesn't work at all. But if I use
$('.land_leadform').hide(0).slideDown(5000);
it works fine.
What could be the reason for .delay
not to work? Is this a known issue or something?
Upvotes: 0
Views: 383
Reputation: 7663
.delay
only works when you're dealing with the animation queue. .hide()
and .show()
without arguments don't interact with the animation queue. By adding the .hide(1)
and .show(1)
before the .delay()
makes the slide animations wait on the queue.
Upvotes: 1