Scriptaculous Sortable.create - Can't hook the dragged element

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2009-08-20T16:01:49Z Indexed on 2010/04/16 11:03 UTC
Read the original article Hit count: 283

Filed under:
|
|

When using Sortable.create I can't seem to get the element that is being dragged. Does Sciptaculous not fully implement all Draggable and Droppable features when you use sortable?

Given:

Sortable.create("sortArea", {scroll:window, onChange:orderLi});

function orderLi(){ console.log(this.draggables.each(function(e){if(e.dragging==true){return e};})); }

My console always shows all the array of draggables. How do I only grab the one that is being dragged?

© Stack Overflow or respective owner

Related posts about scriptaculous

Related posts about prototype