jQuery选择器
选择器
| 属性 | 描述 |
| :first | :last |
| :first-child | :last-child |
| parent>child | :not(selector) |
| prev+next | 匹配prev下的第一个next |
| prev ~siblings | 匹配prev下的所有siblings |
| :has(selector) | 筛选,筛选元素中含有selector的元素 |
| :contains(text) | 匹配(查找)给定文本的元素 |
| :even | 匹配索引值为偶数,从0开始(0,2,4) |
| :odd | 匹配索引值为奇数,从0开始(1,3,5) |
| :eq(index) | 匹配一个索引值 |
| :gt(index) | 匹配所有大于索引值的元素 |
| :lt(index) | 匹配所有小于索引值的元素 |
| :animated | 匹配正在执行动画效果的元素 |
| :foucus | 匹配当前获取焦点的元素 |
| :root | 选择该文档的根元素 |
| :enable | 匹配所有可用元素 |
| :disabled | 匹配所有不可用元素 |
| :empty | 匹配不包含子元素或文本的元素 |
| :parent | 匹配包含子元素或文本的元素 |
| :hidden | 匹配所有不可见元素 |
| :visible | 匹配所有可见元素 |
| [attribute] | 匹配包含给定属性的元素 $(‘div[id]’) |
| [attribute=value] | 匹配给定的属性是某个特定值的元素[name=’demo’] |
| [attribute!=value] | 匹配所有不含有指定的属性 |
| [attribute^=value] | 匹配以某些值开始的元素 |
| [attribute$=value] | 匹配以某些值结尾的元素 |
| [attribute*=value][] | 匹配含有的元素(可复合) |
筛选 |
浙公网安备 33010602011771号