FIND YOUR NEXT FEW LINES

Results for “class”

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

32 snippets foundClear filters
jQueryGetting Started

Add a CSS class

jQuery: Learn how to add a CSS class in a complete browser example.

jQuery✓ Tested
jQueryCollections & styling

Apply classes from explicit Boolean state

jQuery: The second toggleClass argument applies a known state consistently.

jQuery✓ Tested
ReactGetting Started

Assign a CSS class in JSX

Assign a CSS class in JSX with a small React component and explicit browser behavior.

React✓ Tested
AngularTemplates & bindings

Bind a list of CSS classes

Bind a list of CSS classes with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsArguments & decisions

Classify a filename with shell patterns

Bash Scripts: Case patterns support alternatives without launching an external regex tool.

Bash Scripts✓ Tested
jQueryGetting Started

Remove a CSS class

jQuery: Learn how to remove a CSS class in a complete browser example.

jQuery✓ Tested
AngularServices & dependency injection

Replace a service implementation with useClass

Replace a service implementation with useClass with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonStructured data & serialization

Represent a record with a dataclass

Python: Generate initialization and convert a typed record to a dictionary.

Python✓ Tested
jQueryGetting Started

Select all elements with a class

jQuery: Learn how to select all elements with a class in a complete browser example.

jQuery✓ Tested
CSSGetting Started

Target an element by class

CSS: Learn how to target an element by class in a complete browser example.

CSS✓ Tested
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryGetting Started

Toggle a CSS class with a click

jQuery: Learn how to toggle a CSS class with a click in a complete browser example.

jQuery✓ Tested