1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* * selectable_core.js */ var el; var drag = function(dx, dy) { var off = el.offset(), pos = { clientX: off.left, clientY: off.top }; el.simulate("mousedown", pos); $(document).simulate("mousemove", pos); pos.clientX += dx; pos.clientY += dy; $(document).simulate("mousemove", pos); $(document).simulate("mouseup", pos); };