Is there any attibute associated with the starting time I can get from the 'event' parameter in the callback function of a mousemove event?
This code will store time (as timestamp
) when mousemove happend first within a element:
var startTime = null;
$('<YOUR_ELEMENT>').one('mousemove', function(e) {
startTime = e.timeStamp;
console.log(startTime);
});
Have you tried event.timeStamp
?
Returns the time (in milliseconds since the epoch) at which the event was created.