jQuery support Property

Beginner
6 min read
Updated: Oct 2026
5 examples
Live preview

What Is jQuery.support?

jQuery.support (alias $.support) is an object of internal browser feature/bug test results that jQuery uses to pick cross-browser code paths (since jQuery 1.3). It is not a public feature-detection API for your apps.

Remember
typeof jQuery.support        // "object"
Object.keys(jQuery.support) // internal flag names (may change)

// ❌ Do not rely on this in app code:
if ($.support.someFlag) { … }

// ✅ Detect what you need instead:
CSS.supports("display", "flex")
typeof fetch === "function"
NeedUse
App feature detectionModernizr / native APIs
CSS capabilityCSS.supports()
Legacy UA sniffingjQuery.browser (removed)

How to Use jQuery.support

For learning and debugging only — not for production feature gates.

  1. Load jQuery in the browser ($.support needs a DOM).
  2. Inspect with Object.keys($.support) if you are reading legacy code.
  3. Treat every property as unstable — it may be a boolean or a lazy function (1.11+).
  4. For your own features, use native checks or Modernizr instead of $.support.
PieceRequired?Role
Arguments—None — it is a property, not a method
Type—Object of internal flags
Audience—jQuery internals (not your app)

Pseudocode

Pseudocode
jQuery.support = {
  // some keys → boolean result of a browser test
  // some keys → function () { run test; return boolean }  // lazy (1.11+)
}

// jQuery reads these when choosing code paths
// Your app should NOT branch on them

// Preferred:
if CSS.supports("display", "flex"): use flex layout
if typeof fetch === "function": use fetch
else: use fallback

Cheat Sheet

Keep these facts handy when reading old plugins that mention $.support.

TopicDetail
AccessjQuery.support / $.support
AddedjQuery 1.3
DeprecatedjQuery 1.9 (external use)
Lazy testsSome keys are functions (1.11 / 1.12+)
JSONNot reliably serializable
Still in 3.x?Yes, trimmed — internal only
Use insteadModernizr / native feature tests

Live Preview

Inspect the live $.support object in this browser, or run a native feature check instead.

Browser demo of $.support inspection — for learning only, not app feature gates.

Result
Object.keys($.support)
→ (run to inspect this browser)

jQuery Examples

Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.

Example 1 — List Support Property Names

See which internal keys exist in the current jQuery build.

jQuery
console.log($.fn.jquery);
console.log(typeof $.support);
console.log(Object.keys($.support).length);
console.log(Object.keys($.support).join(", "));
Try It Yourself

How It Works

  1. Version. $.fn.jquery shows which jQuery build is loaded.
  2. Object. $.support is always an object when jQuery is present.
  3. Keys. Object.keys lists the current internal flag names.
  4. Unstable. The list can shrink or change — never hard-code assumptions.

Example 2 — Booleans vs Lazy Functions

Since 1.11/1.12, some entries are functions that run a test when called.

jQuery
Object.keys($.support).forEach(function (key) {
  console.log(key + ": " + typeof $.support[key]);
});
Try It Yourself

How It Works

  1. Iterate keys. Walk every property on $.support.
  2. Check typeof. Some values are "boolean", others "function".
  3. Lazy tests. Function properties delay expensive checks until first use.
  4. Why it matters. Treating every value as a boolean can break logging and conditions.

Example 3 — JSON.stringify Pitfall

Functions are skipped or cause surprises when you stringify the whole object.

jQuery
try {
  console.log(JSON.stringify($.support).length);
} catch (err) {
  console.log("failed:", err.message);
}
// Safer: serialize keys only
console.log(JSON.stringify(Object.keys($.support)));
Try It Yourself

How It Works

  1. Official note. Since 1.11/1.12, $.support is not reliably JSON-serializable.
  2. Functions dropped. JSON.stringify skips function properties.
  3. Keys snapshot. Logging Object.keys($.support) is safer for debugging.
  4. Takeaway. Do not persist or send $.support as app data.

Example 4 — Anti-Pattern: Branching on a Flag

Shows why depending on a removed flag breaks — do not copy this into new code.

jQuery
// Anti-pattern — for illustration only
function setFade(el, opacity) {
  if ($.support && $.support.opacity) {
    $(el).css("opacity", opacity);
  } else {
    $(el).css("filter", "alpha(opacity=" + (opacity * 100) + ")");
  }
}

setFade(document.body, 0.5);
console.log("opacity flag exists?", "opacity" in $.support);
Try It Yourself

How It Works

  1. Old idea. Plugins once branched on $.support.opacity.
  2. Flag gone. In jQuery 3.x the key is usually missing → false.
  3. Wrong branch. Code may take the IE filter path forever.
  4. Fix. Set opacity directly, or use CSS.supports().

Example 5 — Prefer Native Feature Detection

What jQuery recommends: detect capabilities your UI actually needs.

jQuery
var features = {
  fetch: typeof fetch === "function",
  flexbox: window.CSS && CSS.supports("display", "flex"),
  localStorage: (function () {
    try {
      localStorage.setItem("_t", "1");
      localStorage.removeItem("_t");
      return true;
    } catch (e) {
      return false;
    }
  })()
};

console.log(JSON.stringify(features, null, 2));
Try It Yourself

How It Works

  1. APIs you use. Test fetch, CSS features, storage — not jQuery internals.
  2. CSS.supports. Stable public API for CSS capability questions.
  3. Try/catch storage. Some environments block localStorage; catch safely.
  4. Stable contract. These checks belong in your app; $.support does not.

Edge Cases & Pitfalls

Check these before trusting anything you see on $.support.

deprecated

Not a public API

Flags may be removed without a major version bump. Official docs: use Modernizr (or native tests) for your project.

lazy

Some values are functions

Since 1.11/1.12, lazy tests return a boolean only when called. Do not assume every property is a boolean.

json

Not JSON-serializable

JSON.stringify($.support) omits functions or is incomplete. Snapshot keys, not the whole object.

vs browser

Different from jQuery.browser

$.browser sniffed the user agent and was removed in 1.9. $.support tests features — but is still deprecated for apps.

Browser Support

jQuery.support needs a browser DOM and jQuery loaded. It has existed since jQuery 1.3 and remains (trimmed) in jQuery 3.x for internal use — deprecated for application code since 1.9.

✓ Deprecated 1.9 · Internal only

jQuery.support

Reachable in browsers with jQuery 1.3+. Still present in jQuery 3.x for jQuery itself — not a stable public feature-detection API for your apps.

Internal Not for app code
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
$.support Deprecated

Bottom line: Inspect for learning; detect features with native APIs or Modernizr in real projects.

Performance Notes

ApproachCostBest for
Eager $.support tests (old)Startup costHistorical jQuery boot
Lazy function properties (1.11+)Pay on first useFaster page start for jQuery
Native / Modernizr checksTargetedFeatures your UI actually needs

jQuery made tests lazy so unused checks do not slow every page. Your app should only test capabilities it will use — not read the whole support object.

Key Takeaways

  • Role: $.support holds jQuery’s internal capability flags.
  • Status: deprecated for apps since 1.9 — still used internally.
  • Lazy: some properties are functions (1.11+), not booleans.
  • Today: Modernizr or native CSS.supports / typeof checks.

One line: jQuery.support is jQuery’s private feature cache — inspect it to learn, never gate your app on its flags.

Frequently Asked Questions

jQuery.support is an object on the global jQuery namespace that caches results of internal browser capability tests. jQuery uses these flags to pick cross-browser code paths for DOM, CSS, and events. It was added in jQuery 1.3.
Yes. jQuery.support was deprecated in jQuery 1.9. The official docs state it is intended for jQuery's internal use only. Application code should not depend on its properties — they may be removed without notice to improve startup performance.
No — jQuery explicitly recommends against it. Use a dedicated library such as Modernizr, or native checks like CSS.supports(), 'fetch' in window, or element.canPlayType(). Those APIs are stable public contracts; jQuery.support properties are not.
Since jQuery 1.11 or 1.12, some support properties are lazy functions that run a test when called, not plain booleans. That deferred testing speeds page load. JSON.stringify cannot serialize functions, so logging the whole object to JSON fails or omits entries.
Yes — a trimmed set of internal flags remains in jQuery 3.7.x for jQuery's own modules. The object is still reachable as jQuery.support or $.support, but it is not a supported public API for developers.
Both were early jQuery browser-detection helpers. jQuery.browser (from navigator.userAgent) was removed in 1.9. jQuery.support tests features and bugs instead of parsing user-agent strings, but it was also deprecated in 1.9 for external use.

Next: jQuery.browser

Learn the removed user-agent sniffing object and what to use instead.

browser tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful