Element Selector ("element")
Selects all elements with the given tag name.
.element(element)
element
| String | An element to search for. Refers to the tagName of DOM nodes. |
JavaScript's getElementsByTagName()
function is called to return the appropriate elements when this expression is used.
Finds every DIV element.
JS
<div>DIV1</div>
<div>DIV2</div>
<span>SPAN</span>
CSS
div,
span {
width: 60px;
height: 60px;
float: left;
padding: 10px;
margin: 10px;
background-color: #eee;
}
HTML
$("div").css("border", "9px solid red");
DEMO