Example

Select the element with the id "choose":

$("#choose")

Try it yourself »

Definition and Usage

The # selector selects an element with a unique id.

The id refers to the id attribute of a HTML element.

The same id should never be used more than once in a document.

Syntax

$("#id")

Parameter Description
id Required. Specifies the id of the element to select.
The id selector uses the id attribute of the HTML element


Tips and Notes

Note: Do not start an ID name with a number. It may cause problems in some browsers.