Home  >  Article  >  Web Front-end  >  Usage examples of next() method in jQuery_jquery

Usage examples of next() method in jQuery_jquery

WBOY
WBOYOriginal
2016-05-16 16:21:461261browse

The example in this article describes the usage of next() method in jQuery. Share it with everyone for your reference. The specific analysis is as follows:

This method obtains the immediately adjacent sibling elements of each element in the set of matched elements.
You can also use optional expressions to filter the collection of sibling elements.

Grammar structure:

Copy code The code is as follows:
$(selector).next(expr)

Parameter list:

参数 描述
expr 可选。用于筛选的表达式

예제 코드:

예 1:

코드 복사 코드는 다음과 같습니다.





next() 함수-스크립트 홈