Thanks for excellent support Richard.
I ended up doing this:
$("#droppable").droppable({
drop: function(event, ui) {
// Also subtract the cursorAt property
var left = event.pageX - this.offsetLeft - 5;
var top = event.pageY - this.offsetTop - 5;
if ($(ui.draggable).parent().attr("id") ===
"initialContainer"){
$(this).append(ui.draggable);
ui.draggable.css("left", left);
ui.draggable.css("top", top);
}
}
});
The #initialContainer is the DIV from where the controls are dragged.
I did this to prevent the moving about of the controls when
repositioning them after the initial drop.
/Casper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---