IT. Expert System.

JQUERY

event.timeStamp


Description

The event.timeStamp property contains the difference in milliseconds between the time an event is triggered and January 1, 1970.

This property can be useful for profiling the performance of certain jQuery functions by getting the event.timeStamp value at two points in the code and noting the difference.


v1.2.6

This property has the form:

event.timeStamp

Return Value

This form returns a Number

Examples

Display the time since the click handler last executed:

<!DOCTYPE html>
<html>
<head>
  <style>
div { height: 100px; width: 300px; margin: 10px;
      background-color: #ffd; overflow: auto; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>

<div>Click.</div>

<script>

var last, diff;
$('div').click(function(event) {
  if (last) {
    diff = event.timeStamp - last
    $('div').append('time since last event: ' + diff + '<br/>');
  } else {
    $('div').append('Click again.<br/>');
  }
  last = event.timeStamp;
});  
</script>

</body>
</html>


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1504 / . Delta: 0.04151 с