FIND YOUR NEXT FEW LINES

Results for “Refs & DOM interaction”

Small, practical examples. Search by task or narrow things down below.

169 snippets foundClear filters
HTMLLinks & accessibility

Provide a skip link

Let keyboard users jump directly to focusable main content.

HTML✓ Tested
jQueryDOM & classes

Remove matching elements

Remove selected list items from the DOM with jQuery.

jQuery✓ Tested
C++Ownership & optional values

Represent an absent result with optional

C++: value_or supplies a default without requiring a sentinel inside the value domain.

C++✓ Tested
CSSInteraction & themes

Respect dark color preference

Apply different CSS colors when the browser requests a dark theme.

CSS✓ Tested
CSSInteraction & themes

Respect reduced motion

Disable a CSS animation when the user prefers reduced motion.

CSS✓ Tested
CSSInteraction & themes

Reuse colors with custom properties

Define a CSS custom property and use it for text color.

CSS✓ Tested
jQueryTraversal & selection

Select an immediate parent

jQuery: parent moves exactly one level up the DOM.

jQuery✓ Tested
HTMLData & disclosure

Show a bounded measurement

Display a measured value within a known range using HTML meter.

HTML✓ Tested
HTMLData & disclosure

Show determinate progress

Represent known completion with an HTML progress element.

HTML✓ Tested
CSSInteraction & themes

Show keyboard focus

Use a visible CSS outline when an input receives keyboard focus.

CSS✓ Tested
HTMLDocument structure

Structure a document with headings

Use a single page heading and a second-level section heading in HTML.

HTML✓ Tested
jQueryDOM & classes

Toggle a state class

Toggle a CSS class in a jQuery click handler.

jQuery✓ Tested