Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(form){ var enabled = false, curPoint = {};
- form.mousemove(function(e){
- if (enabled) {offs = { x:e.pageX-curPoint.x, y:e.pageY-curPoint.y }; curPoint = { x:e.pageX, y:e.pageY }
- form.css({ left:"+=" + offs.x+ "px", top:"+=" + offs.y+ "px" })
- }
- }).mousedown(function(e){curPoint = { x:e.pageX, y:e.pageY }
- enabled = true;
- }).mouseup(function() {
- console.log('mouseup');
- enabled = false;
- })
- })($('#ctrl_mt_addEdit>div.addedit_wrap'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement