JQUERY API

The following applications have been developed using jQuery and HTML.

Click on a function to view the jQuery function in action. Use your browser to view the source code.

add()
Create a new jQuery object with elements added to the set of matched elements.

addBack()
Add the previous set of elements on the stack to the current set, optionally filtered by a selector.

addClass()
Adds the specified class(es) to each element in the set of matched elements.

after()
Insert content, specified by the parameter, after each element in the set of matched elements.

ajaxComplete()
Register a handler to be called when Ajax requests complete. This is an AjaxEvent.

ajaxError()
Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.

ajaxSend()
Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.

ajaxStart()
Register a handler to be called when the first Ajax request begins. This is an Ajax Event.

ajaxStop()
Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.

ajaxSuccess()
Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.

alert()
Replaces the basic functionality provided by the standard JavaScript alert().

All Selector (“*”)
Selects all elements.

animate()
Perform a custom animation of a set of CSS properties.

:animated Selector
Select all elements that are in the progress of an animation at the time the selector is run.

append()
Insert content, specified by the parameter, to the end of each element in the set of matched elements.

appendTo()
Insert every element in the set of matched elements to the end of the target.

attr()
Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.

Attribute Contains Prefix Selector [name|=”value”]
Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).

Attribute Contains Selector [name*=”value”]
Selects elements that have the specified attribute with a value containing a given substring.

Attribute Contains Word Selector [name~=”value”]
Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.

Attribute Ends With Selector [name$=”value”]
Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.

Attribute Equals Selector [name=”value”]
Selects elements that have the specified attribute with a value exactly equal to a certain value.

Attribute Not Equal Selector [name!=”value”]
Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value.

Attribute Starts With Selector [name^=”value”]
Selects elements that have the specified attribute with a value beginning exactly with a given string.

before()
Insert content, specified by the parameter, before each element in the set of matched elements.

bind()
Attach a handler to an event for the elements.

blur()
Bind an event handler to the “blur” JavaScript event, or trigger that event on an element.

:button Selector
Selects all button elements and elements of type button.

callbacks.add()
Add a callback or a collection of callbacks to a callback list.

callbacks.disable()
Disable a callback list from doing anything more.

callbacks.disabled()
Determine if the callbacks list has been disabled.

callbacks.empty()
Remove all of the callbacks from a list.

callbacks.fire()
Call all of the callbacks with the given arguments.

callbacks.fired()
Determine if the callbacks have already been called at least once.

callbacks.fireWith()
Call all callbacks in a list with the given context and arguments.

callbacks.has()
Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list.

callbacks.lock()
Lock a callback list in its current state.

callbacks.locked()
Determine if the callbacks list has been locked.

callbacks.remove()
Remove a callback or a collection of callbacks from a callback list.

change()
Bind an event handler to the “change” JavaScript event, or trigger that event on an element.

:checkbox Selector
Selects all elements of type checkbox.

:checked Selector
Matches all elements that are checked or selected.

Child Selector (“parent > child”)
Selects all direct child elements specified by “child” of elements specified by “parent”.

children()
Get the children of each element in the set of matched elements, optionally filtered by a selector.

Class Selector (“.class”)
Selects all elements with the given class.

clearQueue()
Remove from the queue all items that have not yet been run.

click()
Bind an event handler to the “click” JavaScript event, or trigger that event on an element.

clone()
Create a deep copy of the set of matched elements.

closest()
For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.

:contains() Selector
Select all elements that contain the specified text.

contents()
Get the children of each element in the set of matched elements, including text and comment nodes.

contextmenu()
Bind an event handler to the “contextmenu” JavaScript event, or trigger that event on an element.

css()
Get the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.

data()
Store arbitrary data associated with the matched elements or return the value at the named data store for the first element in the set of matched elements.

dblclick()
Bind an event handler to the “dblclick” JavaScript event, or trigger that event on an element.

delay()
Add handlers to be called when the Deferred object is either resolved or rejected.

delegate()
Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.

dequeue()
Execute the next function on the queue for the matched elements.

Descendant Selector (“ancestor descendant”)
Selects all elements that are descendants of a given ancestor.

detach()
Remove the set of matched elements from the DOM.

:disabled Selector
Selects all elements that are disabled.

.each()
Iterate over a jQuery object, executing a function for each matched element.

Element Selector (“element”)
Selects all elements with the given tag name.

.empty()
Remove all child nodes of the set of matched elements from the DOM.

:empty Selector
Select all elements that have no children (including text nodes).

:enabled Selector
Selects all elements that are enabled.

end()
End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.

.eq()
Reduce the set of matched elements to the one at the specified index.

:eq() Selector
Select the element at index n within the matched set.

.error()
Bind an event handler to the “error” JavaScript event.

:even Selector
Selects even elements, zero-indexed. See also odd.

event.currentTarget
The current DOM element within the event bubbling phase.

event.data
An optional object of data passed to an event method when the current executing handler is bound.

event.delegateTarget
The element where the currently-called jQuery event handler was attached.

event.isDefaultPrevented()
Returns whether event.preventDefault() was ever called on this event object.

event.isImmediatePropagationStopped()
Returns whether event.stopImmediatePropagation() was ever called on this event object.

event.isPropagationStopped()
Returns whether event.stopPropagation() was ever called on this event object.

event.metaKey
Indicates whether the META key was pressed when the event fired.

event.namespace
The namespace specified when the event was triggered.

event.pageX
The mouse position relative to the left edge of the document.

event.pageY
The mouse position relative to the top edge of the document.

event.preventDefault()
If this method is called, the default action of the event will not be triggered.

event.relatedTarget
The other DOM element involved in the event, if any.

event.result
The last value returned by an event handler that was triggered by this event, unless the value was undefined.

event.stopImmediatePropagation()
Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.

event.stopPropagation()
Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.

event.target
The DOM element that initiated the event.

event.timeStamp
The difference in milliseconds between the time the browser created the event and January 1, 1970.

event.type
Describes the nature of the event.

event.which
For key or mouse events, this property indicates the specific key or button that was pressed.

.fadeIn()
Display the matched elements by fading them to opaque.

.fadeOut()
Hide the matched elements by fading them to transparent.

.fadeTo()
Adjust the opacity of the matched elements.

.fadeToggle()
Display or hide the matched elements by animating their opacity.

:file Selector
Selects all elements of type file.

filter()
Reduce the set of matched elements to those that match the selector or pass the function's test.

find()
Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

.finish()
Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.

.first()
Reduce the set of matched elements to the first in the set.

:first-child Selector
Selects all elements that are the first child of their parent.

:first-of-type Selector
Selects all elements that are the first among siblings of the same element name.

:first Selector
Selects the first matched element.

.focus()
Bind an event handler to the “focus” JavaScript event, or trigger that event on an element.

:focus Selector
Selects element if it is currently focused.

.focusin()
Bind an event handler to the “focusin” event.

.focusout()
Bind an event handler to the “focusout” JavaScript event.

.get()
Retrieve the DOM elements matched by the jQuery object.

:gt() Selector
Select all elements at an index greater than index within the matched set.

.has()
Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

Has Attribute Selector [name]
Selects elements that have the specified attribute, with any value.

:has() Selector
Selects elements which contain at least one element that matches the specified selector.

.hasClass()
Determine whether any of the matched elements are assigned the given class.

:header Selector
Selects all elements that are headers, like h1, h2, h3 and so on.

.height()
Get the current computed height for the first element in the set of matched elements or set the height of every matched element.

:hidden Selector
Selects all elements that are hidden.

.hide()
Hide the matched elements.

.hover()
Bind one or two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.

html()
Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.

ID Selector (“#id”)
Selects a single element with the given id attribute.

:image Selector
Selects all elements of type image.

.index()
Search for a given element from among the matched elements.

.innerHeight()
Get the current computed inner height (including padding but not border) for the first element in the set of matched elements or set the inner height of every matched element.

.innerWidth()
Get the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element.

:input Selector
Selects all input, textarea, select and button elements.

.insertAfter()
Insert every element in the set of matched elements after the target.

.insertBefore()
Insert every element in the set of matched elements before the target.

.is()
Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

jQuery.extend()
Merge the contents of two or more objects together into the first object.

jQuery.fx.interval
The rate (in milliseconds) at which animations fire.

jQuery.fx.off
Globally disable all animations.

jQuery.hasData()
Determine whether an element has any jQuery data associated with it.

jQuery.inArray()
Search for a specified value within an array and return its index (or -1 if not found).

jQuery.isArray()
Determine whether the argument is an array.

jQuery.isEmptyObject()
Check to see if an object is empty (contains no enumerable properties).

jQuery.isFunction()
Determine if the argument passed is a JavaScript function object.

jQuery.isNumeric()
Determines whether its argument is a number.

jQuery.isPlainObject()
Check to see if an object is a plain object (created using “{}” or “new Object”).

jQuery.isWindow()
Determine whether the argument is a window.

jQuery.isXMLDoc()
Check to see if a DOM node is within an XML document (or is an XML document).

jQuery.makeArray()
Convert an array-like object into a true JavaScript array.

jQuery.map()
Translate all items in an array or object to new array of items.

jQuery.merge()
Merge the contents of two arrays together into the first array.

jQuery.noConflict()
Relinquish jQuery’s control of the $ variable.

jQuery.now()
Return a number representing the current time.

jQuery.param()
Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input elements with name/value properties.

jQuery.parseHTML()
Parses a string into an array of DOM nodes.

jQuery.parseJSON()
Takes a well-formed JSON string and returns the resulting JavaScript value.

jQuery.parseXML()
Parses a string into an XML document.

jQuery.post()
Load data from the server using a HTTP POST request.

jQuery.proxy()
Takes a function and returns a new one that will always have a particular context.

jQuery.queue()
Show or manipulate the queue of functions to be executed on the matched element.

jQuery.removeData()
Remove a previously-stored piece of data.

jQuery.trim()
Remove the whitespace from the beginning and end of a string.

jQuery.type()
Determine the internal JavaScript [[Class]] of an object.

jQuery.unique()
Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.

.keydown()
Bind an event handler to the “keydown” JavaScript event, or trigger that event on an element.

.keypress()
Bind an event handler to the “keypress” JavaScript event, or trigger that event on an element.

.keyup()
Bind an event handler to the “keyup” JavaScript event, or trigger that event on an element.

:lang() Selector
Selects all elements of the specified language.

.last()
Reduce the set of matched elements to the final one in the set.

:last-child Selector
Selects all elements that are the last child of their parent.

:last-of-type Selector
Selects all elements that are the last among siblings of the same element name.

:last Selector
Selects the last matched element.

length
The number of elements in the jQuery object.

.load()
Load data from the server and place the returned HTML into the matched element.

:lt() Selector
Select all elements at an index less than index within the matched set.

.map()
Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

.mousedown()
Bind an event handler to the “mousedown” JavaScript event, or trigger that event on an element.

.mouseenter()
Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.

.mouseleave()
Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.

.mousemove()
Bind an event handler to the “mousemove” JavaScript event, or trigger that event on an element.

.mouseout()
Bind an event handler to the “mouseout” JavaScript event, or trigger that event on an element.

.mouseover()
Bind an event handler to the “mouseover” JavaScript event, or trigger that event on an element.

.mouseup()
Bind an event handler to the “mouseup” JavaScript event, or trigger that event on an element.

Multiple Attribute Selector [name=”value”][name2=”value2″]
Matches elements that match all of the specified attribute filters.

Multiple Selector (“selector1, selector2, selectorN”)
Selects the combined results of all the specified selectors.

.next()
Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

Next Adjacent Selector (“prev + next”)
Selects all next elements matching “next” that are immediately preceded by a sibling “prev”.

Next Siblings Selector (“prev ~ siblings”)
Selects all sibling elements that follow after the “prev” element, have the same parent, and match the filtering “siblings” selector.

.nextAll()
Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.

.nextUntil()
Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.

.not()
Remove elements from the set of matched elements.

:not() Selector
Selects all elements that do not match the given selector.

:nth-child() Selector
Selects all elements that are the nth-child of their parent.

:nth-last-child() Selector
Selects all elements that are the nth-child of their parent, counting from the last element to the first.

:nth-last-of-type() Selector
Selects all the elements that are the nth-child of their parent in relation to siblings with the same element name, counting from the last element to the first.

:nth-of-type() Selector
Selects all elements that are the nth child of their parent in relation to siblings with the same element name.

:odd Selector
Selects odd elements, zero-indexed. See also even.

.off()
Remove an event handler.

.offset()
Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document.

.offsetParent()
Get the closest ancestor element that is positioned.

.on()
Attach an event handler function for one or more events to the selected elements.

.one()
Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

:only-child Selector
Selects all elements that are the only child of their parent.

:only-of-type Selector
Selects all elements that have no siblings with the same element name.

.outerHeight()
Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without “px”) representation of the value or null if called on an empty set of elements.

.outerWidth()
Get the current computed width for the first element in the set of matched elements, including padding and border.

.parent()
Get the parent of each element in the current set of matched elements, optionally filtered by a selector. Get the children of each element in the set of matched elements, optionally filtered by a selector.

:parent Selector
Select all elements that have at least one child node (either an element or text).

.parents()
Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.

.parentsUntil()
Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.

:password Selector
Selects all elements of type password.

.position()
Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.

.prepend()
Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

.prependTo()
Insert every element in the set of matched elements to the beginning of the target.

.prev()
Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.

.prevAll()
Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.

.prevUntil()
Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.

.promise()
Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

.prop()
Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.

.pushStack()
Add a collection of DOM elements onto the jQuery stack.

.queue()
Show or manipulate the queue of functions to be executed on the matched elements.

:radio Selector
Selects all elements of type radio.

.ready()
Specify a function to execute when the DOM is fully loaded.

remove()
Remove the set of matched elements from the DOM.

.removeAttr()
Remove an attribute from each element in the set of matched elements.

.removeClass()
Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

.removeData()
Remove a previously-stored piece of data.

.removeProp()
Remove a property for the set of matched elements.

.replaceAll()
Replace each target element with the set of matched elements.

.replaceWith()
Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

:reset Selector
Selects all elements of type reset.

.resize()
Bind an event handler to the “resize” JavaScript event, or trigger that event on an element.

:root Selector
Selects the element that is the root of the document.

.scroll()
Bind an event handler to the “scroll” JavaScript event, or trigger that event on an element.

.scrollLeft()
Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.

.scrollTop()
Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.

searching multiple forms
Searching multiple forms in jQuery.

.select()
Bind an event handler to the “select” JavaScript event, or trigger that event on an element.

:selected Selector
Selects all elements that are selected.

.serialize()
Encode a set of form elements as a string for submission.

.serializeArray()
Encode a set of form elements as an array of names and values.

show()
Display the matched elements.

.siblings()
Get the siblings of each element in the set of matched elements, optionally filtered by a selector.

.slice()
Reduce the set of matched elements to a subset specified by a range of indices.

.slideDown()
Display the matched elements with a sliding motion.

.slideToggle()
Display or hide the matched elements with a sliding motion.

.slideUp()
Hide the matched elements with a sliding motion.

.stop()
Stop the currently-running animation on the matched elements.

.submit()
Bind an event handler to the “submit” JavaScript event, or trigger that event on an element.

:submit Selector
Selects all elements of type submit.

:target Selector
Selects the target element indicated by the fragment identifier of the document’s URI.

text()
Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

:text Selector
Selects all input elements of type text.

.toArray()
Retrieve all the elements contained in the jQuery set, as an array.

.toggle()
Display or hide the matched elements.

.toggleClass()
Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the state argument.

.trigger()
Execute all handlers and behaviors attached to the matched elements for the given event type.

.triggerHandler()
Execute all handlers attached to an element for an event.

.unbind()
Remove a previously-attached event handler from the elements.

.undelegate()
Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.

.unwrap()
Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place

.val()
Get the current value of the first element in the set of matched elements or set the value of every matched element.

:visible Selector
Selects all elements that are visible.

.width()
Get the current computed width for the first element in the set of matched elements or set the width of every matched element.

.wrap()
Wrap an HTML structure around each element in the set of matched elements.

.wrapAll()
Wrap an HTML structure around all elements in the set of matched elements.

.wrapInner()
Wrap an HTML structure around the content of each element in the set of matched elements.


© 1997-2017 codehacker.com - All Rights Reserved            RapidSSL