[jQuery] Re: Swap two Interface Draggables

2007-07-13 Thread Richard D. Worth
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 Kar

[jQuery] Re: Swap two Interface Draggables

2007-07-13 Thread Fredrik Karlsson
Managed to figure out how to get the ID of the element under my mouse by using something as simple as: var targetElemID = ""; $('body').mouseover(function(event){ if ($(event.target).is('li')){ targetElemID = $(event.target).attr("id"); } }); The remaining problem