Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery event.timeStamp property

jQuery event.timeStamp property

jQuery event methods jQuery event methods

Example

Return the number of milliseconds elapsed from the first press to the last release of the left mouse button:

$

(

"

button

"

)

.

click

(

function

(

event

)

{

$

(

"

span

"

)

.

text

(

event

.

timeStamp

)

;

}

)

;

Try it »


Definition and Usage

The event.timeStamp property returns the number of milliseconds elapsed from the first press to the last release of the left mouse button.


Syntax

event

.timeStamp

Parameters Description
event Required.event The parameters come from the event binding function.

More examples

Display the number of milliseconds since the last click event
Demonstrates how to use event.timeStamp to display the number of milliseconds since the last click event.


jQuery event methods jQuery event methods