假设这是 DOM:
<body>
<h1>Hello World</h1>
<div class="tooltip">
<div class="tooltip-hd">
This is a Tooltip for header.
</div>
<div class="tooltip-bd">
Some more info about header
</div>
</div>
<div class="container">
<h2>Subheading</h2>
<div class="tooltip">
<div class="tooltip-hd">
This is a Tooltip for header.
</div>
<div class="tooltip-bd">
Some more info about header
</div>
</div>
<p>Contents inside subheading</p>
</div>
</body>
我想选择身体内的所有孩子,不包括“工具提示”类下的孩子
$("body").find("*").not(".tooltip") 将选择项目