I'm changing the width of my div based upon mouse movement.
This is called when mouse moves:
p.resize = function(e) {
var w += e.clientX
myDiv.css({width:w});
};
The problem is the width increases by a lot each time, I need to find out how much the mouse has moved relative to the last time it moved, so I can then increase my div by the amount.
I'm not sure how to implement this, could someone help?