Q:

jQuery: How to write a function on click, hold and move?

I started learning jQuery just yesterday, and I like it very much.
And now I decided to write a script where I can change the margin-left of an image when I click on it, hold the clicking and move the mouse. 
Depending on mouse coordinates I must change the image's margin-left. Could you give me an idea how I can do it? Thanks.

A:

I am not sure I understand completely but it sounds like you want the draggable functionality of jQuery UI.  
http://jqueryui.com/demos/draggable/

