small medium large xlarge

17 Aug 2009, 16:32
Barry Mccall (4 posts)

In the chapter 9 playtime the last bullet asked you to add a link that remoes items from the cart. I put it in successfully but when I add an item I cannot just remove it because of the AJAX effect interfering with the link. Not all of the effects interfere, but the one that I like :grow does


page.replace_html("cart", :partial => "cart", :object => @cart)
page[:cart].visual_effect :slide_down if @cart.total_items == 1
page[:current_item].visual_effect :grow if @current_item.quantity == 1  <-----------
page[:current_item].visual_effect :highlight,
								  :startcolor => "#88ff88" ,
								  :endcolor => "#114411"

It there a way that I can clear the area from the effect of the javascript? So that I can remove an item right after I add it. Right now I have to an another items which clears the effect, then remove twice.


You must be logged in to comment