English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Element selectors select all elements based on the element name.
$("element")
Select each <p> element:
$(document).ready(function(){ $("p").css("background-color", "yellow"); });Test and See‹/›
Select all <p> elements with the class "demo":
$(document).ready(function(){ $("p.demo").css("background-color", "yellow"); });Test and See‹/›
Parameter | Description |
---|---|
element | Specify the element to search for. Reference the tagName of the DOM node. |