small medium large xlarge

 

Pt-F-1-31

ys says:

what i did was

1. add format.js in carts controller destroy method

2. add remote: true on empty button

3. create destroy.js.erb in views/carts with

   $('#cart').html("<%=j render @cart %>.hide('blind', 1000);

it works fine but seems not following given hint…

suke says:

Does the cart appear when you access the page at first?

or

Does the cart appear after you empty the cart and reload the page?

michael says:

@ys: in your 3rd step i did this:

 
$('#cart tr').not('.total_line').remove()
$('#cart').hide('blind', 1000);
Page History
  • V41: Michael Guren [almost 3 years ago]
  • V39: Ian McNaney [about 3 years ago]
  • V40: System [about 3 years ago]
  • V41: Malcolm McKeown [about 3 years ago]
  • V40: Malcolm McKeown [about 3 years ago]
  • V39: Malcolm McKeown [about 3 years ago]
  • V38: Malcolm McKeown [about 3 years ago]
  • V37: Malcolm McKeown [about 3 years ago]
  • V36: joe evans [over 3 years ago]
  • V35: Ilya Fedotov [over 3 years ago]