I have my screen divided into two DIV
s. In the left DIV
I have a few 50x50 pixel DIV
s, in the right DIV
I have an empty g
Thanks for your post - it helped me in the right direction. I find it a bit cleaner to set the position properties of the draggable object instead of messing with the HTML code. This sets the position to the top left corner of the droppable
object, but you can modify to have it centered as well.
drop: function(event, ui) {
$(ui.draggable).css('top', $(this).position().top);
$(ui.draggable).css('left', $(this).position().left);
}