Forum: Ruby on Rails Sortable Elements

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a3b042d48af7d80532f417fe14b13f6?d=identicon&s=25 Scott Harvey (harvey)
on 2007-07-28 12:59
Hello,

I have a page on my website where there is a sortable list (using the
sortable_element helper) and also a form which is used to add items the
sortable list. The sortable list uses the :handle option to setup an
element to drag each list item by.

The problem is when I submit the form (via AJAX) and update the list
(using page.insert_html) I am unable to sort the new item in the list.

I think this is because when the list item is added to the sortable list
the Event observer isn't being created for the handle within the list
item.

If anyone can offer some advise on how to setup an an Event observer in
rjs to make an item draggable using a handle it would be much
appreciated.

Scott
This topic is locked and can not be replied to.