Here an example http://jsfiddle.net/naqbq/
How do I grab current position for x and y after re-position the image?
<input type="hidden" name="source_x" id="source_x" />
<input type="hidden" name="source_y" id="source_y" />
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the
stopcallback, you can useui.helperto access the dragged element. Then useoffseton it, as Brad suggested:Then, it’s just a matter of adjusting it to your wrapper – subtracting its offset and its border’s width – and setting it to your input’s
val.(sorry for hardcoding the border, but I couldn’t extract it using(Edit: there it is! found the solution in another question)css)http://jsfiddle.net/mgibsonbr/naqbq/4/