small medium large xlarge

For facing_pragsmall
26 Aug 2012, 14:30
Vasili Chyrvon (8 posts)


I’ve added the line like in book to my to my create.js.erb:

if ($('#cart tr').length == 1) { $('#cart').show('blind', 1000); }

and it works, but a little ugly… The cart appears not smoothly. First appears “Your cart” with duration of approximately one second, and then the rest part of the cart appears in a trice. I am using Google Chrome.

Maybe someone knows what is wrong?

26 Aug 2012, 16:09
Bess Fernandez (5 posts)

the problem with this is that all divs are set to display:inline; in the CSS.. though i forgot where in the book this was.

just make sure to set div#cart { display: block; }

and you’ll be good. also see my other post in the forum.. at some pont there were two wrapping divs around the cart - make sure there is only one.

For facing_pragsmall
03 Sep 2012, 17:58
Vasili Chyrvon (8 posts)

Hi, Bess! Thank you, @display: block@ works just perfect! Maybe you could explain why the ‘blind’ in Chrome doesn’t work with @inline@? I’m not sure that I understand why it happened.

17 Feb 2013, 23:38
Jonathan Sibley (2 posts)

Hi Bess and Vasili,

I’m seeing the same behavior in Chrome, but I can’t figure out the right place to set it’s display attribute to block (it needs to be none when the cart is empty, right?).

Where/when are you guys setting display: block on the #cart div?

Thanks, Jon

17 Feb 2013, 23:54
Jonathan Sibley (2 posts)

By the way this is in Task F: Add a Dash of Ajax

  You must be logged in to comment