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.
有谁熟悉 Sizzle 吗?是否支持选择缓存 DOM 节点的子节点?像 jQuery:
var body = jQuery('body'); var div = jQuery('#mydiv',body);
10 倍的帮助,BR
使用带有上下文的直接子选择器:
Sizzle( "> *", body);
事实上,我直接复制粘贴了 Sizzle 源代码,这很有效,所以我不明白反对意见:
var body = Sizzle("body"); var childrenOfBody = Sizzle( "> *", body[0]);