Lee.Longmore-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Jul-09 09:31 UTC
How do I capture the class of a Draggable?
Hello, I''d like to send the class of a Draggable element as a parameter to an AJAX call triggered from the Droppable. How do I access the class name of the Draggable? Also, how do I access the value of an Id associated with an element? Do I call a method on $("My Element") ? Thank you. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
parry.luke-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Jul-09 14:20 UTC
Re: How do I capture the class of a Draggable?
Hey there, Assign the new Draggable to a variable so var myDraggable = new Draggable(...); if you haven''t done so. Then use this variable to access the element and what you want. e.g. Getting the elements id: myDraggable.element.id or Getting the element''s classes: myDraggable.element.classNames() the latter returns an enumerable. to get just the elements id, use $(My Element).id remember Prototype extends dom elements, so you can use it like this. Hope that helps. Mr Parry. On Jul 9, 10:31 am, "Lee.Longm...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <lee_longm...-/E1597aS9LT10XsdtD+oqA@public.gmane.org> wrote:> Hello, > > I''d like to send the class of a Draggable element as a parameter to an > AJAX call triggered from the Droppable. How do I access the class name > of the Draggable? > > Also, how do I access the value of an Id associated with an element? > Do I call a method on $("My Element") ? > > Thank you.--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---