small medium large xlarge

Generic-user-small
18 Oct 2013, 20:43
Michael Guren (4 posts)

I have downloaded the code posted on this web site to see if that would work…..it does not (‘depot_n’).

Adding a product to the cart results in the cart briefly being displayed (with no HTML)…more like a stutter step down. Then after the specified number of seconds in the jQuery slide function (e.g. 1,000), the HTML pops into position. No sliding effect.

Something to note. The book uses a condition testing the number of ‘tr’ elements. If there is 1 ‘tr’ element then the cart should be displayed. This is flawed. An empty cart will have 1 tr element (for the total price). A cart with 1 line item will therefore have 2 ‘tr’ elements.

Generic-user-small
18 Oct 2013, 21:32
Michael Guren (4 posts)

Upon further analysis, this appears to be a jQuery issue. Changing from slideDown(); to slideUp(); DOES animate an existing cart up and hides the div. The slide down call seems to be a bug in jQuery. :/

Generic-user-small
19 Oct 2013, 17:02
Michael Guren (4 posts)

I found a solution, just in case others are having the same problem.

Within application.css.scss, remove this line:

form, div { display: inline; }

For some reason, the inline form div is causing a problem with jQuery.

Generic-user-small
16 Nov 2013, 19:42
John Ryan (3 posts)

Thanks for posting, Michael! I ran into this problem as well.

Not sure why the “form, div” is in there, there’s no need for it.

Generic-user-small
16 Jan 2014, 04:00
john calvin (1 post)

Exact same problem I had and removing ‘display:inline;’ worked for me. Thanks!

  You must be logged in to comment