Category: jQuery

jQuery / Method / .clone() - Copy Selected Elements
Copy and insert elements with jQuery .clone(), choosing event and data options. A complete counter-card example covers copy depth, unique IDs, shared nested data and reset.

jQuery / Method / .fadeToggle() - Reverse Each Element’s Visibility
Learn how .fadeToggle() reverses each element independently. Two panels with opposite initial states demonstrate completion callbacks, rapid clicks, interrupted reset and replay.

jQuery / Method / .fadeOut() - Gradually Hide Selected Elements
Distinguish hiding with .fadeOut() from DOM removal. A complete editable-notice example covers removal after completion, preserved input, restoration and interrupted reset.

jQuery / Method / .fadeIn() - Gradually Reveal Selected Elements
Understand .fadeIn() duration and per-element completion callbacks. A complete two-panel example covers visible progress, interrupted reset, replay and reduced-motion preferences.

jQuery / Method / .click() - Run Actions When an Element Is Clicked
Distinguish event binding from triggering in jQuery .click() and migrate to .on() and .trigger(). A complete example covers dynamic buttons, duplicate bindings, scoped removal and reset.

jQuery / Method / .children() - Select Direct Child Elements
Select direct children and filter them with jQuery .children(). A complete nested-card example compares .find(), .contents(), dynamic insertion and restoring the original selection.

jQuery / Property / .length - Count Selected Elements
Use jQuery .length to count elements and check whether they exist. A complete add/remove/reset example explains hidden matches, filtered counts and saved versus freshly queried collections.

jQuery / Selector / :nth-child() - Select Sibling Positions with an+b
Learn one-based sibling positions and an+b formulas in jQuery :nth-child(). A complete mixed-element example compares .eq(), :nth-of-type(), formula results and dynamic insertion.

jQuery / Selector / :odd - Select Elements at Odd Indexes
Understand zero-based :odd indexes and migrate to .odd(). A complete table example compares header scope, CSS sibling positions, row insertion, filter order and reset behavior.

jQuery / Selector / :has() - Select Elements Containing a Matching Element
Select outer elements that contain matching descendants with :has(). A complete link-addition example compares direct children, nested elements, .has() and .find(), including expected results and reset behavior.