jQuery slideDown() not animating (jquery-rails 3.0.4; jquery-ui-rails (4.0.5)
Posted
by
Michael Guren
on Stack Overflow
See other posts from Stack Overflow
or by Michael Guren
Published on 2013-10-18T21:45:25Z
Indexed on
2013/10/18
21:54 UTC
Read the original article
Hit count: 161
I am following along in the latest Agile Web Development with Rails 4 book. In Chapter 11 (AJAX), the book instructs us to use the following code in the "create.js.erb" file:
if ($('#cart tr').length == 1) { $('#cart').show('blind', 1000); }
This code causes the #cart div to jump down without any content. After 1 second it appears. There is no sliding effect.
I tried using slideDown(); as well, but the div just appears immediately. Out of curiosity, I tried slideUp(); when the div was visible. Voila. The div slid up.
This appears to be a jQuery bug and wondered if anyone else has experienced this, or has any suggestions for me.
Thanks.
© Stack Overflow or respective owner