Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有两个 jQuery 结果集,比如说
$("#someParent *")
和
$("#someElement").nextAll()
那么我怎样才能最好地获得两个结果集中出现的所有元素呢?
您可以使用filter():
var firstSet = $("#someParent *"); var secondSet = $("#someElement").nextAll(); var elementsInBothSets = firstSet.filter(secondSet);