hi,

I have a draggable element (cart-item) in a shopping cart

 <%= draggable_element "item_#{product}_#{i}", :revert => true %>

When this element is dragged outside the cart into the "main_div", I want to show a puff effect and remove the element. When it is dragged within the cart, it should revert.

So i wrote this code for  drop_receiving _element

<%= drop_receiving_element "cart",
      :update => "items",
      :url ="" nil,
      :accept => "cart-items"  %>
      
<%= drop_receiving_element "main_div", 
                   :update => "items", :url ="" { :action ="" "remove" },
      :accept => "cart-items",
       :before => visual_effect(:Puff  ),
      :loading => "Element.show('indicator')",
      :complete => "Element.hide('indicator')" %>

If I drop the cart-item within the cart, it works ok.

But if I drop the item outside the cart, it starts reverting first and does a puff later [ the puff is almost un-noticable].

What would i need to change to have a propert puff effect.

Thanks,
Manik.
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to