Results for “query”
Small, practical examples. Search by task or narrow things down below.
Clear a container’s contents
jQuery: Learn how to clear a container’s contents in a complete browser example.
jQuery✓ Tested
Clear an element
Remove child content while keeping the jQuery-selected container.
jQuery✓ Tested
Clone markup without sharing its identity
jQuery: clone creates a separate node; change duplicated IDs before inserting.
jQuery✓ Tested
Collapse a panel after an animation
jQuery: slideUp hides the panel when the transition completes.
jQuery✓ Tested
Collect matching ancestors
jQuery: parents can return several ancestors, ordered from the nearest outward.
jQuery✓ Tested
Collect repeated form field names
jQuery: serializeArray preserves multiple values as name-value records.
jQuery✓ Tested
Combine two selections
jQuery: add returns a combined collection in document order.
jQuery✓ Tested
Compare with a calculated value
Find products above the average price.
subquery✓ Tested
Count matched elements
jQuery: Learn how to count matched elements in a complete browser example.
jQuery✓ Tested
Delete a cached data entry
jQuery: removeData removes the jQuery cache value for the selected key.
jQuery✓ Tested
Disable a button
Set the live disabled property with jQuery prop.
jQuery✓ Tested
Disable animations for a reduced-motion mode
jQuery: The global fx.off switch causes effects to finish immediately.
jQuery✓ Tested