I have written the below code to calculate mouse moved co-ordinates
$(document).mousemove(function(e){
console.log(e.pageX + ", " + e.pageY);
});
and here is the fiddle.
My Question is, when I move mouse slowly I am able to see all the mouse moved co-ordinates in console. But when I move faster I could not see all. Only few are counted.Is there any problem with my code?
You will need to intrapolate them (i.e. calculate the points in between yourselves). The browser will just return the mouse position at every new tick (e.g. every 0.01 second).
Happily, the mouse position is only checked every so often, otherwise the OS would immediately freeze.
Intrapolation could look like