有没有办法在单个查询中组合多选择器和基本过滤器?
例如...
var jq = $(someElement);
// Want to find the first following sibling node which has either classA or classB.
// This imaginary jquery does not quite work.
jq.nextAll("(.classA, .classB):first")
// This works. But I wonder if I can achieve the same result with just one query.
jq.nextAll(".classA, classB)").filter(":first")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2574 次 |
| 最近记录: |