SyntaxStudy
Sign Up
Home jQuery Reference

jQuery Reference

20 entries — click any item for full details and examples

DOM Manipulation

Name Description
$() / jQuery() The jQuery function selects DOM elements, wraps elements, or runs code when the DOM is ready.
.html() / .text() .html() gets/sets the HTML content; .text() gets/sets the text content (HTML-escaped).
.val() Gets or sets the value of form elements like inputs, selects, and textareas.
.addClass() / .removeClass() / .toggleClass() Add, remove, or toggle CSS classes on selected elements.
.attr() / .prop() / .data() .attr() gets/sets HTML attributes; .prop() handles DOM properties; .data() accesses data-* attributes.
.css() Gets or sets CSS properties on selected elements.
.append() / .prepend() / .remove() Insert content inside elements or remove elements from the DOM.

Event Methods

Name Description
.on() Attaches event handlers. Supports event delegation for dynamically created elements.
.click() / .submit() / .keyup() Shorthand event binding methods for common events: click, submit, change, keyup, keydown, hover.
.off() / .one() .off() removes event handlers; .one() attaches a handler that fires only once then auto-removes.

Effects

Name Description
.show() / .hide() / .toggle() Show, hide, or toggle the visibility of elements with optional animation duration.
.fadeIn() / .fadeOut() / .fadeToggle() Animate opacity changes to show or hide elements smoothly.
.slideUp() / .slideDown() / .slideToggle() Animate height changes to show or hide elements with a sliding motion.
.animate() Performs custom animations by gradually changing CSS numeric properties.

AJAX Methods

Name Description
$.ajax() Performs an asynchronous HTTP request. The low-level foundation for all jQuery AJAX methods.
$.get() / $.post() Shorthand methods for common GET and POST AJAX requests.
$.getJSON() / .load() $.getJSON() fetches JSON data; .load() loads HTML from a URL into a selected element.

Traversal

Name Description
.find() / .filter() / .not() .find() searches descendants; .filter() narrows current set; .not() excludes matching elements.
.parent() / .children() / .siblings() Traverse the DOM tree relative to the selected element.
.each() Iterates over a jQuery set, executing a function for each matched element.