Try this:

<table border="1" cellpadding="5">
        <tr>
                <td valign="top">
                        <ul id='fList'>
                                <li>Apples</li>
                                <li>Grapes</li>
                                <li>Strawberries</li>
                        </ul>
                </td>
                <td valign="top">
                        <div id='fish' class='meat'>Fish</div>
                        <div id='chicken' class='meat'>Chicken</div>
                </td>
        </tr>
</table>


Code:

Sortable.create("fList", {constraint:false})
new Draggable('fish',{revert:true})
new Draggable('chicken',{revert:true})
Droppables.add('fList',
{accept:'meat',onDrop:function(dragName,dropName)
{placeFood(dragName,dropName)}})

function placeFood(dragName,dropName) {
        $("fList").insert(new Element("li", { id: $(dragName).id+"_" }))
        $($(dragName).id+"_").innerHTML = $(dragName).innerHTML
        Sortable.destroy("fList")
        Sortable.create("fList", {constraint:false})

}

On Jul 3, 10:08 am, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> I would like to be able to drop a Draggable element into an existing
> Sortable list, and have that element "join" the sort. It seems to me
> that I would need to remove the existing Sortable, and then re-create
> it once the new element is in place. But that's as far as I've gotten
> in my musings. Can anyone point out an example of this pattern that I
> could pick apart?
>
> This is a re-stating of a question I asked yesterday, which didn't
> get any answers yet.
>
> Thanks in advance,
>
> Walter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to