HI - I''m trying to set up a test page that has 3 columns. Within each column is a draggable div. I''d like the user to be able to drag any of the divs contained within the left right or center divs. I can''t get it working - I''ve looked over the script.aculo.us wiki docs and elsewhere but the only examples I''ve seen deal with unordered lists. Here is my code: --------------------------- <%= drop_receiving_element("right") %> <%= drop_receiving_element("center") %> <%= drop_receiving_element("left") %> <div id="left"> <div id="left_value"><%= draggable_element("left_value", :ghosting => true, :revert => true) %> <h3>LEFT</h3> </div> </div> <div id="center"> <div id="center_value"><%= draggable_element("center_value", :ghosting => true, :revert => true) %> <h3>CENTER</h3> </div> </div> <div id="right"> <div id="right_value"><%= draggable_element("right_value", :ghosting => true, :revert => true) %> <h3>RIGHT</h3> </div> </div> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
bnolan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-31 02:25 UTC
Re: Help with Draggables (script.aculo.us)
You want to use sortables not draggable. http://demo.script.aculo.us/ajax/sortable_elements Cheers, Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hi - I gave that a try with no luck. I thought it might help to post a screenshot and firebug dump of what I''m seeing: http://philipsoutham-dev.s3.amazonaws.com/CA/Chico/Rileys/20061030/1024/847e7992543ac72e468cb6ac857e40cf1a52254d.jpg Here is the code: <%= stylesheet_link_tag ''newprofile'' %> <div id="left"> <div id="left_value"><%= sortable_element("left_value", :ghosting => true, :revert => true) %> <h3>LEFT</h3> </div> </div> <div id="center"> <div id="center_value"><%= sortable_element("center_value", :ghosting => true, :revert => true) %> <h3>CENTER</h3> </div> </div> <div id="right"> <div id="right_value"><%= sortable_element("right_value", :ghosting => true, :revert => true) %> <h3>RIGHT</h3> </div> </div> Thanks in advance, Chad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Did you try using the Sortable class? I was trying to do the same as you did. Using the Sortable class worked very well for me --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---