Results for “class”
Small, practical examples. Search by task or narrow things down below.
Add a CSS class
jQuery: Learn how to add a CSS class in a complete browser example.
jQuery✓ Tested
Apply classes from explicit Boolean state
jQuery: The second toggleClass argument applies a known state consistently.
jQuery✓ Tested
Assign a CSS class in JSX
Assign a CSS class in JSX with a small React component and explicit browser behavior.
React✓ Tested
Bind a list of CSS classes
Bind a list of CSS classes with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Classify a filename with shell patterns
Bash Scripts: Case patterns support alternatives without launching an external regex tool.
Bash Scripts✓ Tested
Remove a CSS class
jQuery: Learn how to remove a CSS class in a complete browser example.
jQuery✓ Tested
Replace a service implementation with useClass
Replace a service implementation with useClass with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Represent a record with a dataclass
Python: Generate initialization and convert a typed record to a dictionary.
Python✓ Tested
Select all elements with a class
jQuery: Learn how to select all elements with a class in a complete browser example.
jQuery✓ Tested
Target an element by class
CSS: Learn how to target an element by class in a complete browser example.
CSS✓ Tested
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
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