Scriptaculous Sortable Element Issue

I have a

    that contains a number of list items, and I’m using the
    sortable_element helper to reorder then via drag-and-drop. This works
    great, however, when I insert a new
  • into the
      with Ajax, the
      sortable_element doesn’t know about it. Is there a way to refresh this
      collection?

      Thanks for any help.

On 26-jun-2006, at 21:57, guest wrote:

I have a

    that contains a number of list items, and I’m using the
    sortable_element helper to reorder then via drag-and-drop. This works
    great, however, when I insert a new
  • into the
      with Ajax, the
      sortable_element doesn’t know about it. Is there a way to refresh this
      collection?

Send another Sortable.create command along with your new LI element.


Julian ‘Julik’ Tarkhanov
please send all personal mail to
me at julik.nl

Intersting. Do I “send” it in the controller, or my RJS template?

Thanks

Julian ‘Julik’ Tarkhanov wrote:

On 26-jun-2006, at 21:57, guest wrote:

I have a

    that contains a number of list items, and I’m using the
    sortable_element helper to reorder then via drag-and-drop. This works
    great, however, when I insert a new
  • into the
      with Ajax, the
      sortable_element doesn’t know about it. Is there a way to refresh this
      collection?

Send another Sortable.create command along with your new LI element.


Julian ‘Julik’ Tarkhanov
please send all personal mail to
me at julik.nl

Nevermind. I got it. Thanks a lot! :slight_smile:

Julian ‘Julik’ Tarkhanov wrote:

On 26-jun-2006, at 21:57, guest wrote:

I have a

    that contains a number of list items, and I’m using the
    sortable_element helper to reorder then via drag-and-drop. This works
    great, however, when I insert a new
  • into the
      with Ajax, the
      sortable_element doesn’t know about it. Is there a way to refresh this
      collection?

Send another Sortable.create command along with your new LI element.


Julian ‘Julik’ Tarkhanov
please send all personal mail to
me at julik.nl