Category: jQuery

jQuery / Load jQuery in HTML and Start Using It
Load jQuery before dependent code and control elements with selectors and events. Complete CDN and local defer examples explain file placement, execution order, version checks and loading failures.

jQuery / noConflict() with Other Libraries and jQuery Versions
Restore the previous dollar alias and use a local jQuery reference. Two runnable examples explain the true argument, loading order and limits of plugin and data ownership.

jQuery / Select Parents Without a Specific Child
Distinguish absence of a matching descendant from absence of a direct child. A complete example compares not, has, children and :empty with text, whitespace, comments and hidden elements.

jQuery / Filter Parents by Child Count
Count children separately inside each parent’s filter callback. A complete example compares direct children and descendants, exact and minimum counts, hidden items and dynamic changes.

jQuery / Create a Menu That Stays Fixed at the Top
Fix a menu after scrolling past its original position and restore it on return. A complete example preserves layout space, adjusts width on resize and keeps anchor headings visible.

jQuery / Read meta Tag Values
Read meta content with the appropriate name or property selector. A complete example distinguishes empty values, missing attributes, duplicate tags and the current DOM, with safe text output.

jQuery / Compare width, innerWidth and outerWidth
Compare which content, padding, border and margin each width method includes. A complete example contrasts box-sizing models, fractional measurements and practical measurement limits.

jQuery / Select and Clear All Checkboxes
Synchronize a master checkbox with individual items. A complete example covers partial selection, disabled items, dynamic additions and removals, empty lists and submitted form values.

jQuery / Change an HTML Tag
Replace an HTML container with a new element while retaining its child nodes. A runnable example distinguishes preserved input and child events from the old wrapper’s attributes, data and handlers.

jQuery / Create a Smooth Back-to-Top Link
Enhance a real anchor with jQuery scrolling. A complete example covers repeated clicks, reduced motion, interruption and moving keyboard focus after reaching the top.