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().
Remember
$.now() → Number (ms since 1970-01-01 UTC)
Date.now() → same idea (prefer this)
// Example shape (value changes every call):
$.now() → 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.
Fresh. Each call reads “now” again — values differ over time.
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
Hello from panel-1728000000123
(id suffix changes each run)
How It Works
Build id. Prefix + $.now() makes a unique string.
Create. Make a div and set that id.
Show. Put the id in the text so you can see it.
Caveat. Two calls in the same ms can collide — fine for demos, not crypto IDs.
Edge Cases & Pitfalls
Check these before relying on $.now() in production.
deprecated
Gone in jQuery 4.0
Calling $.now() on jQuery 4+ throws. Migrate to Date.now() before upgrading.
clock
System clock can jump
Epoch time follows the OS clock. NTP adjustments can make elapsed diffs look odd. For short UI timing, performance.now() is steadier.
ids
Not a unique-ID guarantee
Two calls in the same millisecond can match. Fine for demos; use a counter or crypto.randomUUID() when uniqueness matters.
precision
Millisecond resolution only
$.now() / Date.now() are whole milliseconds. Micro-benchmarks need performance.now().
Compatibility
Browser Support
jQuery.now() needs jQuery 1.4.3–3.x loaded. It is removed in jQuery 4.0. Prefer Date.now() in every modern browser.
✓ jQuery 1.4.3–3.x · Deprecated
jQuery.now()
Works in Chrome, Firefox, Safari, and Edge when jQuery 1.4.3–3.x is loaded. New projects should call Date.now() instead.
LegacyUse Date.now()
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.nowDeprecated
Bottom line: Replace $.now() with Date.now() — same Number, no jQuery dependency.
Analysis
Performance Notes
Approach
Cost
Best for
Date.now()
O(1), native
All new code
$.now()
O(1), alias
Legacy jQuery 1.4.3–3.x
new Date().getTime()
Allocates Date
When you already need a Date
performance.now()
High-res, relative
Precise duration in the page
Prefer Date.now() for clarity and future-proofing. The cost difference vs $.now() is negligible; the API status is what matters.
Remember
Key Takeaways
Role:$.now() returns epoch milliseconds.
Alias: same idea as Date.now().
Migrate: replace with Date.now() (gone in jQuery 4).
Elapsed:end - start both from now.
One line:$.now() is a deprecated alias for Date.now() — use the native method in new code.
Frequently Asked Questions
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.