jQuery element ~ siblings 选择器
jQuery 教程
· 2019-03-10 10:58:52
实例
选取 <div> 元素同级的所有 <p> 元素:
$("div ~ p")
定义和用法
("element ~ siblings") 选择器选取指定元素 "element" 同级的所有元素。
比如:
- $("div ~ p") - 选取 <div> 元素同级的所有 <p> 元素。
注意:指定的两个元素共享相同的父元素。
语法
("element ~ siblings")
| 参数 | 描述 |
|---|---|
| element | 必需。任何有效的 jQuery 选择器。 |
| siblings | 必需。规定 element 参数的同级。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Mobilizing Web Sites
Layon, Kristofer / 2011-12 / 266.00元
Everyone has been talking about the mobile web in recent years, and more of us are browsing the web on smartphones and similar devices than ever before. But most of what we are viewing has not yet bee......一起来看看 《Mobilizing Web Sites》 这本书的介绍吧!