jquery Ajax manipulation functions with jquery traversal functions and jquery data manipulation functions

Source: Internet
Author: User
Tags http post jquery library

How to manipulate jquery documents

The JQuery Library has a complete Ajax compatibility suite. The functions and methods allow us to load data from the server without refreshing the browser.

Function description

Jquery.ajax () executes an asynchronous HTTP (Ajax) request.

. Ajaxcomplete () registers the handler to invoke when the Ajax request is complete. This is an Ajax event.

. Ajaxerror () registers the handler to invoke when the Ajax request is complete and an error occurs. This is an Ajax event.

. Ajaxsend () displays a message before the Ajax request is sent.

Jquery.ajaxsetup () sets the default value for future Ajax requests.

. Ajaxstart () registers the handler to invoke when the first Ajax request finishes. This is an Ajax event.

. Ajaxstop () registers the handler to invoke when all Ajax requests are complete. This is an Ajax event.

. Ajaxsuccess () displays a message when the Ajax request completes successfully.

Jquery.get () loads data from the server using an HTTP GET request.

Jquery.getjson () loads JSON-encoded data from the server using an HTTP GET request.

Jquery.getscript () loads the JavaScript file from the server using an HTTP GET request and executes the file.

. Load () Loads the data from the server and then puts the returned HTML into the matching element.

Jquery.param () Creates a serialized representation of an array or object and is suitable for use in URL query strings or Ajax requests.

Jquery.post () loads data from the server using an HTTP POST request.

. Serialize () serializes the contents of the form into a string.

. Serializearray () serializes the form element and returns the JSON data structure.

JQuery traversal function

The JQuery traversal function includes methods for filtering, finding, and concatenating elements.

Function description

The. Add () Adds an element to the collection of matching elements.

. Andself () adds the previous set of elements in the stack to the current collection.

. Children () Gets all the child elements of each element in the matching element collection.

. closest () starts with the element itself, and then ranks the ancestor element in a step-by-step, returning the first matching ancestor.

. Contents () Gets the child elements of each element in the matching element collection, including the text and comment nodes.

. each () iterates over the JQuery object and executes the function for each matching element.

. End () ends the most recent filter operation in the current chain and returns a collection of matching elements to the previous state.

. EQ () shrinks the matching element collection to a new element at the specified index.

. Filter () reduces the set of matching elements to a new element that matches the selector or the return value of the matching function.

. Find () Gets the descendants of each element in the current matching element collection, filtered by the selector.

. First () reduces the set of matching elements to be the number one element in the collection.

. has () shrinks the collection of matching elements into a collection of descendants that contain a particular element.

. is () checks the current set of matching elements based on the selector and returns true if at least one of the matching elements exists.

. Last () shrinks the matching element collection to the final element in the collection.

. Map () passes each element in the current matching collection to the function, producing a new JQuery object that contains the return value.

. Next () gets the sibling element adjacent to each element in the matching element collection.

. Nextall () gets all the sibling elements after each element in the matching element collection, which is optionally filtered by the selector.

. Nextuntil () obtains all the sibling elements after each element until it encounters an element that matches the selector.

. not () removes an element from the collection of matching elements.

. OffsetParent () Gets the first parent element used for positioning.

. Parent () Gets the parent element of each element in the current matching element collection, which is optionally filtered by the selector.

. Parents () Gets the ancestor element of each element in the current matching element collection, optionally filtered by the selector.

. Parentsuntil () Gets the ancestor element of each element in the current matching element collection until it encounters an element that matches the selector.

. Prev () Gets the previous sibling element immediately adjacent to each element in the matching element collection, optionally filtered by the selector.

. Prevall () gets all the sibling elements before each element in the matching element collection, which is optionally filtered by the selector.

. Prevuntil () obtains all the sibling elements before each element until it encounters an element that matches the selector.

. Siblings () Gets the sibling elements of all elements in the matching element collection, optionally filtered by the selector.

. Slice () reduces the set of matching elements to a subset of the specified range.

JQuery Data manipulation functions

These methods allow us to associate the specified DOM element with any data.

Function description

. Clearqueue () Removes all items from the queue that are not running.

. Data () stores arbitrary data related to the matching element.

Jquery.data () stores arbitrary data related to the specified element.

. Dequeue () removes a queue function from the front of the queue and executes it.

Jquery.dequeue () removes a queue function from the front of the queue and executes it.

Jquery.hasdata () stores arbitrary data related to the matching element.

The. Queue () Displays or operates a queue that matches the functions executed by the element.

Jquery.queue () Displays or operates the queue that matches the function executed by the element.

. Removedata () Removes the previously stored data.

Jquery.removedata () Removes the previously stored data.

jquery Ajax manipulation functions with jquery traversal functions and jquery data manipulation functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.