I've been developing a image manipulation script which has a background and user can upload one or more images onto that background. I want users to be able to drag and move around the BG and finally they can generate final image. However, I have no idea how to get the position of draggable image position on BG. I've been searching around the Internet and ebooks but no clue. Please show me some way and I'll be waiting for your precious replies.
Take a look at position()
:
var pos = $("#myimage").position(); // returns an object with the attribute top and left
pos.top; // top offset position
pos.left; // left offset position
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With