Something like that?
$("div").mousedown(function() {
$("div").on('mousemove', function(event) {
$('div').html("( " + event.clientX + ", " + event.clientY + " )");
});
})
$("div").mouseup(function() {
$("div").off('mousemove');
})
You bind the event when the mouse button is pressed and unbind it when the button is released.