Javascript Drag-and-Drop Ordered Lists

By , 1 September 2004

Javascript Drag-and-Drop Ordered Lists

Yet another "couldn't already find this web thing on the Internet" discovery. Using a modified version of Youngpup's DOM-Drag, I created a list that you can reorder in the DOM by dragging and dropping elements around:

drag and drop

  • Foo
  • Bar
  • Baz
  • Quux

The really nice thing about doing it in the DOM, rather than just moving the positions around, is that you can then create a form which encodes the new order, by inspecting the elements of the list at submit time. I'll be using this to provide an editable playlist for Songbee. The next step is, of course, to be able to drag new songs onto the playlist from a separate list of available songs.

Javascript Drag-and-Drop Ordered Lists

About I Like Spam

Javascript Drag-and-Drop Ordered Lists

You May Also Like

Leave a Comment

Please visit https://ilikespam.com/javascript-drag-and-drop-ordered-lists to add your comments.