FIND YOUR NEXT FEW LINES

Results for “HTML”

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

503 snippets foundClear filters
jQueryDeferred work & queues

Resolve a deferred result

jQuery: done receives the value supplied to resolve.

jQuery✓ 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
jQueryGetting Started

Respond to a button click

jQuery: Learn how to respond to a button click in a complete browser example.

jQuery✓ Tested
jQueryEvent control

Respond to the Enter key

jQuery: Use the event key rather than deprecated numeric key codes.

jQuery✓ Tested
jQueryGetting Started

Respond when a select value changes

jQuery: Learn how to respond when a select value changes in a complete browser example.

jQuery✓ Tested
jQueryGetting Started

Respond while a user types

jQuery: Learn how to respond while a user types in a complete browser example.

jQuery✓ Tested
jQueryForm serialization & state

Restore a form’s original default values

jQuery: Call the native reset method through the underlying form element.

jQuery✓ Tested
jQueryTraversal & selection

Return to the previous collection in a chain

jQuery: end restores the selection before the last traversal operation.

jQuery✓ Tested
CSSGetting Started

Reuse a CSS custom property

CSS: Learn how to reuse a CSS custom property in a complete browser example.

CSS✓ Tested
CSSInteraction & themes

Reuse colors with custom properties

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

CSS✓ Tested
jQueryAnimation completion

Reveal a collapsed panel with a slide

jQuery: slideDown animates the panel’s vertical dimensions.

jQuery✓ Tested