Category: jQuery

jQuery / Method / .not() - Exclude Elements from a Selection
Exclude matching elements from the current jQuery collection with .not(). A complete example distinguishes DOM removal, multiple selectors, callback tests, node references and filter.

jQuery / Method / jQuery.trim() - Remove Whitespace at String Edges
jQuery.trim() trimmed string edges and was removed in jQuery 4. A complete native trim migration example covers null and numeric inputs, internal spaces and Unicode whitespace differences.

jQuery / Method / jQuery.inArray() - Find an Array Index Correctly
Interpret the index and -1 returned by jQuery.inArray(). Complete examples compare numbers and strings, starting positions, object references, NaN and native indexOf/includes alternatives.

jQuery / Method / .text() - Read or Replace Text Contents
Read combined text from multiple elements and display strings without parsing tags. A complete example covers hidden text, whitespace, per-element results, callback setters, empty values and val.

jQuery / Method / .html() - Read or Replace an Element’s Contents
Read the first element’s HTML and replace the contents of all selected elements with .html(). Complete examples explain text and val, user input, replacement events and callback arguments.

jQuery / Method / .hover() - Enter and Leave Events with on Alternatives
Understand .hover() entry and exit handlers and replace them with .on(). A complete example covers child boundaries, dynamic elements, keyboard focus and namespaced binding and removal.

jQuery / Method / .hide() - Hide Selected Elements
Hide elements without removing them using jQuery .hide(), with immediate or timed effects. A complete two-panel example covers retained input, per-element callbacks, show and reset during animation.

jQuery / Method / .get() - Retrieve Selected Elements as an Array
Use .get(index) for a DOM element and .get() for a plain array. Runnable examples explain negative indices, empty selections, the difference from eq and shared node references.

jQuery / Method / .detach() - Remove and Keep Elements for Reuse
Temporarily detach an element with jQuery while retaining its data and events. A complete editable-card example explains restoration, original position, references and the differences from remove and empty.

jQuery / Method / .delay() - Delay the Next Operation in an Effects Queue
Learn which jQuery operations wait after .delay(), using a complete show(0) versus show() example. Manage queued work and reset, and use setTimeout for general cancellable tasks.