Latest web development tutorials

jQuery: focus selector

jQuery selector jQuery selector

Examples

Select the current element has the focus:

$(":focus")

try it"

Definition and Usage

: Focus selector to select the current element has focus.

Tip: This selection is often used in conjunction with a name tag or another selector, so if you do not use, the selection will be equivalent to ( "*: focus").


grammar

$(":focus")

jQuery selector jQuery selector