This is my code taken from http://jqueryui.com/demos/draggable/
I would recommend doing it like this because if you want to pass a configuration object to the draggable function, you won't have to repeat it in two different places: