YouTip LogoYouTip

Api Focusable Selector

# jQuery UI API - :focusable Selector ## Category (#) | (#) ## Usage **Description:** Selects elements that can be focused. jQuery( ":focusable" ) Some elements are inherently focusable, while others require an explicit tab index. In both cases, for an element to be focusable, it must be visible. The following types of elements are focusable if they are not disabled: `input`, `select`, `textarea`, `button`, and `object`. Anchors are focusable if they have an `href` or `tabindex` attribute. `area` elements are focusable if they are in a named map, have an `href` attribute, and have a visible image using the map. All other elements are focusable based solely on the `tabindex` attribute and visibility. Note: Elements with a negative tab index are `:focusable`, not `:tabbable`. ## Example Selects focusable elements and highlights them with a red border. :focusable Selector Example input, a, p { border: 1px solid #000; } div { padding: 5px; }
Anchor without href
Anchor with href

Paragraph without tabindex

Paragraph with tabindex

$( ":focusable" ).css( "border-color", "red" ); (#) [](#)[jQuery UI API – :data() Selector](#) [jQuery UI API – :tabbable Selector](#)[](#) [Volcengine Coding Plan supports mainstream large models like Doubao, GLM, DeepSeek, Kimi, MiniMax, officially supplied, stable and reliable. Configuration Guide Β₯9.9/month Subscribe Now](https://maas.xfyun.cn/modelSquare?ch=maas_lm_l2E)
← Api Tabbable SelectorApi Data Selector β†’