Drag Element

This is a example drags a rectangle. It uses files: TweenMax.min.js, Draggable.min.js
The draggable area is the svg root: It will not extend beyound its bounds.

Method:

(Note attribute changes at myRect)

SVG Source:
Javascript: