jQuery event.timeStampProperty
Example
Return the number of milliseconds elapsed from the first press of the left mouse button to the last release:
$("button").click(function(event){
$("span").text(event.timeStamp);
});
Try it Yourself »
Definition and Usage
The event.timeStamp property returns the number of milliseconds elapsed from the first press of the left mouse button to the last release.
Syntax
event.timeStamp
| Parameter | Description |
|---|---|
| event | Required.eventThe parameter comes from the event binding function. |
More Examples
Display the number of milliseconds since the last click event
Shows how to use event.timeStamp to display the number of milliseconds since the last click event.
Other Extensions
jQuery Event Methods