jQuery
MiscMethod
jQuery Misc Methods
| Method |
Description |
|
data() |
Attach data to, or get data from, selected elements |
|
each() |
Execute a function for each matched element |
|
get() |
Get the DOM elements specified by a selector |
|
index() |
Search for a given element from among the matched elements |
|
$.noConflict() |
Release the jQuery control over the variable $ |
|
$.param() |
Create a serialized representation of an array or object (can be used in a URL query string when making an AJAX request) |
|
removeData() |
Remove data previously stored |
|
size() |
Deprecated in version 1.8.Return the number of DOM elements matched by the jQuery selector |
|
toArray() |
Retrieve all DOM elements contained in the jQuery collection, as an array |
|
pushStack() |
Add a collection of DOM elements to the jQuery stack |
|
$.when() |
Provide a method to execute callback functions for one or more objects |
jQuery Utilities
| Method |
Description |
| $.boxModel |
Deprecated in version 1.8.Detect whether the browser uses the W3C CSS box model to render the current page |
|
$.browser |
Deprecated in version 1.9.Return information about the browser currently used by the user |
|
$.contains() |
Determine whether another DOM element is a descendant of the specified DOM element |
|
$.each() |
Iterate over the specified object and array |
|
$.extend() |
Merge the contents of one or more objects into a target object |
|
$.fn.extend() |
Extend one or more instance properties and methods for jQuery |
|
$.globalEval() |
Globally execute a piece of JavaScript code |
|
$.grep() |
Filter and return the elements of an array that satisfy the specified function |
|
$.inArray() |
Search an array for a specified value and return its index (or -1 if not found) |
|
$.isArray() |
Determine whether the specified parameter is an array |
|
$.isEmptyObject() |
Check whether an object is empty (contains no properties) |
|
$.isFunction() |
Determine whether the specified parameter is a function |
|
$.isNumeric() |
Determine whether the specified parameter is a numeric value |
|
$.isPlainObject() |
Determine whether the specified parameter is a plain object |
|
$.isWindow() |
Determine whether the specified parameter is a window |
|
$.isXMLDoc() |
Determine whether a DOM node is in an XML document, or is itself an XML document |
|
$.makeArray() |
Convert an array-like object into a true array object |
|
$.map() |
Use a specified function to process each element in an array (or each property of an object), and return the results wrapped in a new array |
|
$.merge() |
Merge the contents of two arrays into the first array |
|
$.noop() |
An empty function |
|
$.now() |
Return the current time |
|
$.parseHTML() |
Parse an HTML string into an array of corresponding DOM nodes |
|
$.parseJSON() |
Convert a JSON string in standard format into a corresponding JavaScript object |
|
$.parseXML() |
Parse a string into a corresponding XML document |
|
$.trim() |
Remove whitespace from both ends of a string |
|
$.type() |
Determine the type of a JavaScript built-in object |
|
$.unique() |
Deprecated in jQuery 3.0.Sort an array of DOM elements, and remove duplicate elements |
|
$.uniqueSort() |
Sort an array of DOM elements, and remove duplicate elements |
|
$.data() |
Store data on the specified element, and return the set value |
|
$.hasData() |
Determine whether an element has associated jQuery data |
|
$.sub() |
Create a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object |
|
$.speed |
Create an object containing a set of properties to define custom animations |
|
$.htmlPrefilter() |
Modify and filter HTML strings using jQuery manipulation methods |
|
$.readyException() |
Handle errors thrown synchronously by functions wrapped in jQuery() |
jQuery Callbacks Object
The jQuery.Callbacks() function, added in jQuery 1.7, returns a multi-purpose object that provides a powerful way to manage callback lists. It can add, remove, trigger, and disable callback functions.
jQuery Deferred Object
The Deferred object, introduced in jQuery 1.5, is a chainable utility object created by calling the jQuery.Deferred() method. It can register multiple callback functions into callback lists, invoke callback lists, and pass the success or failure state of asynchronous or synchronous functions.
Deferred objects are chainable, similar to the way a jQuery object is chainable, except they have their own methods. After creating a Deferred object, you can use any of the following methods to directly link to the object created or saved by calling one or more methods.
| Method |
Description |
$.Deferred() |
Return a chainable utility object method to register multiple callbacks |
deferred.always() |
Add handlers to be called when the Deferred object is resolved or rejected |
deferred.done() |
Add handlers to be called when the Deferred object is resolved |
deferred.fail() |
Add handlers to be called when the Deferred object is rejected |
deferred.isRejected() |
Obsolete since jQuery 1.7, determine whether the Deferred object has been rejected. |
deferred.isResolved() |
Obsolete since jQuery 1.7, determine whether the Deferred object has been resolved. |
deferred.notify() |
Given an argument, call the callback functions (progressCallbacks) in progress on the Deferred object |
deferred.notifyWith() |
Given context and arguments, call the callback functions (progressCallbacks) in progress on the Deferred object |
deferred.pipe() |
Utility method to filter and/or chain Deferred objects |
deferred.progress() |
Add handlers to be called when the Deferred object generates progress notifications |
deferred.promise() |
Return the Promise object of the Deferred |
deferred.reject() |
Reject the Deferred object and call any failCallbacks with the given arguments |
deferred.rejectWith() |
Reject the Deferred object and call any failCallbacks with the given context and args arguments |
deferred.resolve() |
Resolve the Deferred object and call any doneCallbacks with the given arguments |
deferred.resolveWith() |
Resolve the Deferred object and call any doneCallbacks with the given context and args arguments |
deferred.state() |
Determine the current state of a Deferred object |
deferred.then() |
Add handlers to be called when the Deferred object is resolved, rejected, or still in progress |
.promise() |
Return a Promise object to observe whether all actions of a certain type bound to the collection have been added to the queue |
Other extensions