728x90
SMALL

Selector 15

[jQuery] jQuery / Selector / :nth-child() - Selector that selects the an+bth sibling element

#jQuery #:nth-child() :nth-child() :nth-child() is a selector that selects the an+bth sibling element. grammar $( ':nth-child(an+b)' ) a and b are constants, n is a variable. Non-negative integers (0, 1, 2, 3, ...) are assigned to n in sequence. You can use even, odd instead of an+b. example $( 'ol li:nth-child(2)' ) Selects the second element from the sibling elements of li, which is a child el..

jQuery 2022.08.02
728x90
LIST