<div>的jQuery选择器,它不包含<img>?

jes*_*vin 7 jquery jquery-selectors

如何使用jQuery 选择所有<div>不包含任何<img>元素的元素?

Tat*_*nen 18

$('div:not(:has(img))')
Run Code Online (Sandbox Code Playgroud)

  • 听起来像一个lolcat captioneer想出来的东西 (9认同)