# Drag and drop sorting not working at all?

**URL:** <https://www.ruby-forum.com/t/drag-and-drop-sorting-not-working-at-all/157961>\
**Category:** Rails\
**Created:** [January 16, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/drag-and-drop-sorting-not-working-at-all/157961 "2009-01-16T23:15:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [January 16, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/drag-and-drop-sorting-not-working-at-all/157961/1 "2009-01-16T23:15:33Z")

</div>

Silly though it may be, I can’t get a list to be draggable. I haven’t  
set up the update partials but I can’t even get the elements to become  
draggable. Here is what my HTML output is:

- John
- Edward
- Bill

The ERB for this is:  
\<%= sortable\_element “Q#{question.position}\_answer\_list”,  
:update =\> “Q#{question.position}\_answers”,  
:complete =\> visual\_effect(:highlight,  
“Q#{question.position}\_answer\_list”) %\>

Why won’t these elements drag??? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [January 16, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/drag-and-drop-sorting-not-working-at-all/157961/2 "2009-01-16T23:34:54Z")

</div>

Taylor S. wrote:

> Silly though it may be, I can’t get a list to be draggable. I haven’t  
> set up the update partials but I can’t even get the elements to become  
> draggable. Here is what my HTML output is:

Apparently drag and drop doesn’t work with just dragdrop.js as specified  
in an older rails tutorial. You need the full prototype library. Using  
javascript\_include\_tag :defaults fixed this issue.
