jQuery draggable + droppable: how to snap dropped element to dropped-on element

I found that Keith’s method worked for me. Since his answer doesn’t include an example implementation, I’ll post mine: $(‘.dropTarget’).droppable({ drop: function(ev, ui) { var dropped = ui.draggable; var droppedOn = $(this); $(dropped).detach().css({top: 0,left: 0}).appendTo(droppedOn); } }); or, slightly more concisely: $(‘.dropTarget’).droppable({ drop: function(ev, ui) { $(ui.draggable).detach().css({top: 0,left: 0}).appendTo(this); } });

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)