Results for “Traversal & selection”
Small, practical examples. Search by task or narrow things down below.
Select siblings up to a boundary
jQuery: nextUntil excludes the boundary element itself.
jQuery✓ Tested
Select siblings while excluding the current element
jQuery: siblings selects other children of the same parent.
jQuery✓ Tested
Select the immediately following sibling
jQuery: next does not search beyond the next sibling.
jQuery✓ Tested
Select the immediately preceding sibling
jQuery: prev moves backward by one sibling.
jQuery✓ Tested
Separate a first item from the remaining items
JavaScript: Array destructuring and a rest element produce named pieces of a sequence.
JavaScript✓ Tested
Separate a first item from the remaining items
TypeScript: Array destructuring and a rest element produce named pieces of a sequence.
TypeScript✓ Tested
Filter a selection
Reduce a jQuery selection to elements with a matching class.
jQuery✓ Tested
Find descendants
Select only matching descendants of a jQuery container.
jQuery✓ Tested
Find the nearest matching ancestor
Read a parent row attribute using jQuery closest.
jQuery✓ Tested
Read checked options
Collect checked checkbox values with jQuery map and get.
jQuery✓ Tested
Visit selected elements
Use jQuery each to label every item with its one-based position.
jQuery✓ Tested
Add a calculated property during selection
PowerShell: A calculated property can derive a value while retaining selected original properties.
PowerShell✓ Tested