You could make the li droppable and then handle onDrop:
$('li').Droppable({ accept : 'draggable', onDrop : function(dragged) { var hold = $(document.createElement('div')).insertAfter(dragged); $(this).after(dragged); hold.after(this).remove(); } }); - Richard On 7/12/07, Fredrik Karlsson <[EMAIL PROTECTED]> wrote:
Currenly I'm working on a project where I'm using a bunch of droppables and draggables to organize list items. Now there is one thing I can't figure out how to do. If I have two droppables containing lists with items (<div class="droppable"><ul>...</ul></div>), and I want to swap one of the items in one droppable with one in another droppable, basically swapping to <li> tags, by drag/dropping one on the other. Is there a way to get the id of the <li> my mouse is hovering when dropping my dragged item? I have a demo at http://www.ethowin.net/WoW/raidplanner.php. I'm also thinking of rewriting it by using sortables instead. Any suggestions?