jQuery Reference

This section documents jQuery 3.x (the current major line — no specific patch version is pinned). This content was generated with the assistance of AI and should be verified against the official jQuery API reference before being relied on in production, since API details and deprecations continue to change between releases.

jQuery is legacy-leaning: modern browsers implement native equivalents for almost everything it does (querySelectorAll, classList, fetch, addEventListener, append/prepend/remove, the Web Animations API), and most current stacks — Bootstrap 5 included — have dropped it. Prefer the native APIs for new work; this reference is aimed at reading, maintaining, or incrementally migrating code that already uses jQuery. Every page ends with a Modern equivalent note pointing at the native replacement.

This section’s bibliography lists the reference material consulted while preparing these pages.

Welcome to the jQuery reference. jQuery is a JavaScript library that gives the browser DOM a terse, chainable, cross-browser API for selecting elements, changing them, handling events, animating, and making AJAX requests. It was near-universal on the web for a decade; today the native platform covers almost all of it, so this section documents jQuery 3.x for reading, maintaining, and migrating existing code, and every page ends with the modern native equivalent.

If you are new to the library, start with Getting Started with jQuery and jQuery Selectors, then work down the list or jump to what you need.

What’s covered

Core

  • Getting Started with jQuery — what jQuery and the $ function are, the wrapped set vs. raw DOM nodes, why and when not to use it, adding it via download or CDN with Subresource Integrity, and the document-ready pattern.

Selecting & traversing

  • jQuery Selectors — basic, hierarchy, and attribute selectors, plus the jQuery-only filter/form/state pseudo-selectors and which of them are non-standard and slow.

  • Traversal and Chaining — moving up, down, and sideways in the DOM; filtering and iterating a set; and method chaining with the .end() / .addBack() stack.

Changing the page

  • DOM Manipulation — reading/writing content, inserting elements inside and outside a target, wrapping, removing vs. detaching, cloning, replacing, and creating elements.

  • CSS, Classes, Attributes and Dimensions — classes and inline styles, the .attr() vs. .prop() distinction, and the dimension and position/scroll methods.

  • Effects and Animation — show/hide, fade, slide, the general-purpose .animate(), and the per-element effects queue.

Behaviour

  • Event Handling — binding with .on() / .off() / .one(), the jQuery event object, event delegation for dynamic elements, and programmatic and namespaced events.

  • Element Data and Utility Functions — .data(), .index(), getting raw nodes out of a set, and the jQuery.* static helpers with their native replacements.

Talking to the server

  • AJAX — jQuery.ajax() and its shorthands, the jqXHR promise and its callbacks, form serialization, and global AJAX events.

Beyond jQuery

  • Plugins and Modern Usage — writing a well-behaved $.fn plugin, an orientation to jQuery UI/Mobile and common plugins, and migrating off jQuery with jquery-migrate and a jQuery-to-native map.

  • Worked Example: An Interactive List — one self-contained mini-project (a dynamic list with add / remove / reorder via delegated events) that ties the concept pages together.

Reference

  • Cheat sheet — a one-page, downloadable PDF summary of the essentials above for quick memorization.

  • Related questions — a multiple-choice self-test covering the topics above, each with a single answer verified against the official jQuery API reference, plus a downloadable PDF.

Bibliography

  • Svekis, Laurence. Ultimate Modern jQuery for Web App Development. Orange Education Pvt Ltd / AVA™, 2024. ISBN 978-81-97081-94-1 (print), 978-81-97081-99-6 (ebook). The primary reference for this section — see the publisher’s book page and orangeava.com.

  • api.jquery.com — the official jQuery API reference, used to verify every method signature, deprecation, and behavior note here (and every answer on the related questions page).

  • jquery.com — the project site, and learn.jquery.com — the jQuery Foundation’s learning centre.

  • jquery-migrate — the official plugin for finding and shimming APIs removed across jQuery major versions, referenced from Plugins and Modern Usage.

  • MDN Web Docs — the source for the "modern native equivalent" notes that close each page (querySelectorAll, classList, fetch, addEventListener, the Web Animations API, and so on).