jQuery.now() (alias $.now()) returns the current time as milliseconds since the Unix epoch (since jQuery 1.4.3). Official docs: it is an alias for Date.now().
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$.now() → Number (ms since 1970-01-01 UTC)
Date.now() → same idea (prefer this)
// Example shape (value changes every call):
$.now() → 1728000000123
Call
What it does
Arguments
Method takes no parameters
Return
Number — epoch milliseconds
Since
jQuery 1.4.3
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Call $.now() (or prefer Date.now()).
Step 2
Use the Number for timing, IDs, or query strings.
Step 3
For elapsed time: end - start (both from now).
Return Value
Return Value
Description
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Current Timestamp
Read the epoch milliseconds and confirm the type.
jQuery
var timestamp = $.now();
console.log(typeof timestamp); // "number"
console.log(timestamp); // e.g. 1728000000123
Type: number
Value: 1728000000123
(value changes each run)
How It Works
Call.$.now() needs no arguments.
Type. Result is always a number.
Meaning. Milliseconds since 1970-01-01 UTC.
Example 2 — $.now vs Date.now
Official idea: $.now() is an alias for Date.now().
jQuery
console.log($.now === Date.now); // true in modern jQuery
var a = $.now();
var b = Date.now();
console.log(typeof a === "number");
console.log(Math.abs(a - b) <= 1); // same clock, within 1 ms
jQuery.now() returns a Number: milliseconds since the Unix epoch (1 Jan 1970 UTC). It takes no arguments. Officially it is an alias for Date.now().
Yes. Deprecated in jQuery 3.3 and removed in jQuery 4.0. Prefer native Date.now() in all new code. On jQuery 1.4.3–3.x, $.now() still works for legacy maintenance.
Same millisecond timestamp. $.now() was a convenience next to other jQuery utilities. In modern jQuery builds, $.now is typically the Date.now function itself. Always migrate to Date.now().
All three give epoch milliseconds for “now.” Date.now() / $.now() avoid creating a Date object. new Date().getTime() allocates a Date first — same numeric idea, slightly more work.
For rough elapsed checks, yes: end - start. For high-resolution timing, prefer performance.now() — sub-millisecond precision relative to page load, not the Unix epoch.
Replace every $.now() call with Date.now(). Behavior matches: same Number, no arguments, same epoch meaning.