Ram*_*No5 27 jquery css-selectors jquery-selectors
我现在似乎无法看到森林中的树木(已经看过api文件).
它与jQuery选择器有关:我要做的是选择所有具有类subtitle或者的元素headsection.像这样的东西:$('.headsection || .subtitle');
更具体一点:我想将此选择器与函数一起使用nextUntil.
$content = $some_elements.eq(0).nextUntil('.headsection || subtitle');
Run Code Online (Sandbox Code Playgroud)
据我所知||,jQuery的选择器中没有.那么实现这一目标的最佳方法是什么?
谢谢你的帮助!
只需用逗号将它们分开:
$content = $some_elements.eq(0).nextUntil('.headsection, subtitle');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24396 次 |
| 最近记录: |