ctrl+k
Enter a search term above to see results...
Access underlying DOM elements and their properties directly.
$('selector').el();Returns the first DOM element in the collection.
First DOM element, or undefined if empty.
const element = $('button').el();element.focus();$('selector').get();$('selector').get(index);Gets DOM elements from the Query object. Returns native DOM elements, not Query objects.
| Name | Type | Description |
|---|---|---|
| index | number | Index of element to retrieve (supports negative) |
undefined if out of rangeconst first = $('p').get(0);const last = $('p').get(-1);const elements = $('p').get();elements.forEach(el => console.log(el.textContent));$('selector').prop(name);$('selector').prop(name, value);Gets or sets a DOM property on elements. Unlike attributes, properties reflect the current state (e.g., checked, disabled, selectedIndex).
| Name | Type | Description |
|---|---|---|
| name | string | Property name |
| value | any | Value to set |
const isChecked = $('input[type="checkbox"]').prop('checked');$('input[type="checkbox"]').prop('checked', true);