Reputation: 6894
Here's the code http://jsfiddle.net/DTYEB/ after dropping the element into the dropbox if I put below code, I want the element to be at a position of 25,25 relative to the dropbox(dropboxOuter)
$(dragElement).animate({
"left" : "25",
"top" : "25"
}, 1000 );
But this puts the element underneath the div ... any help
Upvotes: 0
Views: 56
Reputation: 12541
There is a couple of bugs that I have fixed: http://jsfiddle.net/DTYEB/14/
Code i used to get relative drop:
$(dragElement).animate({
left: $('#dropbox').position().left + 25,
top: $('#dropbox').position().top + 25
}, 1000);
Upvotes: 1