jq- get jq objects

## objects get jq
basis:
$ ( '')

$ ( "# Id") single

$('div')

$('.class')

level:

$('div span')

$('div>span')

Adjacent sibling selector: $ ( "h1 + p" ) matches the first sibling element of a selector, while satisfying the requirements sibling selector 2
$ ( "h1 of ~ H2") matching the selector 1 all satisfy the selection is 2 siblings

: Screening
first: ( 'first div') to meet all the div $

$ ( 'Class:. Last') last


$ ( 'Select option: odd') odd index

$ ( 'Select option: even') of the even index


$ ( 'Div> span: eq (index)') is equal to the index of the index

$ ( 'Div> span: lt (index)') is less than the index of the index

$ ( 'Div> span: gt (index)') is greater than the index of the index

$ ( 'Div: not (span)') meet outside the span of removing div

 

Guess you like

Origin www.cnblogs.com/chenlulu1122/p/11888857.html