I have a sortable div thus:

Sortable.create('timeline',{tag:'div', overlap:'horizontal',  
constraint:false,  scroll:window, dropOnEmpty:true});

div#timeline is contained within a larger div#drop which is droppable.

<div id="drop">
<p>A lovely caption explaining the DnD behavior</p>
<div id="timeline">

I then have a bunch of elements of class clip or class photo which are  
individually set to be draggable. When I drag a clip or a photo onto  
div#drop, an onDrop function inserts a clone of the dropped object  
into div#timeline.

At this point, if I run Sortable.create again, these dropped items  
become sortable. But if I do that, I run into other issues later that  
I'm having trouble overcoming.

So my question is this: Is it possible to add elements to a Sortable  
by any means other than physically dragging and dropping without re- 
running the create method afterward? I've looked through the script  
and can't see a function that adds the dragged element into it. I've  
been using $('timeline').insert(clonedElement), and while it does put  
the element into the div, the result is not sortable.

Thanks in advance,


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to