Michael Buffington <michael.buffington@...> writes:
>
> I''m pretty comfortable using sortable_element and the array of
ID''s it
> provides, but I''m stumped on one thing: how do I tell my action
what
> element was dragged (or ID, if that''s the case)?
>
> I can''t rely on the array, because that only tells me the new
order.
>
I had the same question and problems. How to figure out what ID matches up to
the draggable element? Well here is my little hack. There has got to be a
better way but I have not found it in the docs yet.
I just attached the ID of the object and then separated it from the
element(sequence here) that will be sortable.
<code>
<li class="button" id="item_<%=item.id-%>:<%=
item.sequence-%>">
<span class="handle">DRAG HERE</span>
<span><%= item.title -%></span>
</li>
</code>
hope that helps...
necroscree