jquery traversal function

Source: Internet
Author: User

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

. 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 child elements of each element in the matching element collection.

. Closest (): starts with the element itself, and then increments the ancestor element, returning the first matching ancestor element.

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

. each (): Falls on 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 (): Reduces the set of matching elements to the element of 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 selectors.

. First (): Shrinks the Ppys to the number one element in the collection.

. has (): Shrinks the Ppys collection to a collection that contains descendants of a particular element.

. is (): Checks the pawn Ppys collection according to the selector, and returns true if at least one ppys exists.

. Last (): Reduces Ppys to the final element in the collection.

. Map (): Passes each element in the current Ppys collection to a function, producing a new jquery object that contains the return value.

. Next (): Gets the sibling element adjacent to each element in the Ppys collection.

. Nextall (): Gets all the sibling elements that are adjacent to each element in the Ppys collection, optionally filtered by selectors.

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

. Not (): Removes an element from the Ppys collection.

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

. Parent (): Gets the parent element of each element in the Ppys collection, optionally filtered by the selector.

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

. Parentuntil (): Gets the parent element of each element in the Ppys collection until the element that matches the selector is encountered.

. Prev (): Gets the first sibling element adjacent to each element in the Ppys collection, optionally filtered by selectors.

. Prevall (): Gets all of the sibling elements before each element in the Ppys collection, optionally filtered (optional).

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

. Siblings (): Gets the sibling element that matches all elements of the element collection, optionally filtered by the selector.

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

Summarize yourself so that you can view and learn later!

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.