Selectors
As the name suggests, selector
attributes are used to select various elements of HTML. The selector
attributes basically support the CSS selectors.
Selectors begin with a $
sign followed by parentheses: $()
Element selectors
Element selectors select elements using their name. For example, if a paragraph is written in the tags <p>
, you can select this paragraph using its name, that is, p
:
$("p")
Parameters
The name of the element to be chosen is passed as a parameter.
Returns
The element selectors returns the element.
Description
The element selectors select elements using their name. For example, if a paragraph is written in the tags <p>
, you can select this paragraph using its name.
ID selectors
ID selectors select elements using their ID. Each ...
Get Web Developer's Reference Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.