jQuery element ~ siblings selector
Definition and Usage
( "Element ~ siblings") picker to select the specified element "element" of all elements at the same level.
such as:
- $ ( "div ~ p") - Select <div> element at the same level for all <p> elements.
Note: Two elements specified share the same parent element.
grammar
(" element ~ siblings ")
参数 | 描述 |
---|---|
element | 必需。任何有效的 jQuery 选择器。 |
siblings | 必需。规定element参数的同级。 |