JQ learning (six): Screening

filter

1.eq (index): Get matching element in the first N elements, from zero

2.first (): Get the first element of the matched elements

3.last (): Gets the last element of the matched elements

4.hasClass (class): checking whether the element contains a particular class

5.filter (expr): Screening and expression to match elements specified element

6.is (expr): with a collection element detects whether the expression contains at least one of the elements to meet the requirements, there Returns true, such as checking the input parent () Is not form

7.map (callback function): converting a group of elements into an array

8.has (expr): contains the elements specified conditions reservation offspring

9.not (expr): Delete the elements that match the specified criteria

10.slice (start, [end]): select a subset of a matching, front-containing free principle, (0,2) is the first element of the first element 0

Seek

children ([expr]): obtaining elements of all the child elements each element comprising a matched set of elements in the set

closest ([expr]): Returns the parent element of the first matching elements

find (expr): returns all elements matching expression match

next ([expr]): to obtain a matching element in the set of elements comprising each element immediately behind the sibling set

All the siblings made after the current element: nextAll ([expr])

All the elements between the acquired current element satisfying the condition elements expr: nextUntil ([expr])

offsetParent (): obtaining a first parent node of the matching element for positioning

parent (): contains all the elements to get a matching elements of the unique collection of the parent element

parents (): get a ancestor element contains all the elements of a collection of matching elements

parentUntil ([expr]): Find all of the current element of the parent element, that element until the first match

prev (): with next () method analogous

prevAll (): and nextAll () method analogous

prevUntil (): and nextUntil () method analogous

siblings (): returns a collection of element selected element peer

Series connection

add (expr): to add elements to the existing set of elements

addBack (): the elements of the collection before adding to the current set of elements

contents (): Returns all direct child elements

end (): end the current filter chain recent operation, and the matching elements of the set time before returning to the state

 

 

Published 94 original articles · won praise 8 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_38827988/article/details/104076438