jQuery - Get mouse position while dragging link
drag-and-drop, jquery
Solution
You need to `return false` in your `mousedown` handler, to prevent the default action of selecting text upon drag.
Updated fiddle
Problem
I'm trying to track the mouse position while I click and drag an `a[href]` value to the bookmarks bar (it's for a bookmarklet). It seems to stop tracking a few seconds after I start dragging. Code is below. ``` var isDragging = false; $('a#dragthis') .mousedown(function() { $(window).mousemove(function(e) { isDragging = true; var x = e.pageX; var y = e.pageY; console.log(x + "|" + y); }); }); ``` Here is a jsFiddle example: http://jsfiddle.net/GZpHP/