Results for “attributes”
Small, practical examples. Search by task or narrow things down below.
Copy a directory while preserving attributes
Linux Commands: Use cp -a for a recursive local copy that preserves links and ordinary file attributes.
Linux Commands✓ Tested
Declare LF normalization for a file type
Git: A gitattributes rule records text normalization expectations for matching paths.
Git✓ Tested
Allow one disclosure in a named group to stay open
HTML: Matching details name attributes create an exclusive native accordion in supporting browsers.
HTML✓ Tested
Disable a button
Set the live disabled property with jQuery prop.
jQuery✓ Tested
Read a data attribute
Read an element data attribute with jQuery data.
jQuery✓ Tested
Read a value from a trusted XML document
PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.
PowerShell✓ Tested
Reserve an image’s display dimensions
HTML: Width and height attributes supply a known display size and aspect ratio before decoding finishes.
HTML✓ Tested
Set a form field value
Populate a labeled input with jQuery val.
jQuery✓ Tested
Set an element attribute
Update an HTML link using jQuery attr.
jQuery✓ Tested
Set text safely
Use jQuery text to insert literal content instead of interpreting HTML.
jQuery✓ Tested
Store an object associated with an element
jQuery: data retains JavaScript values without serializing them into HTML attributes.
jQuery✓ Tested