jQuery selector for
which does not contain <

2019-04-07 10:33发布

问题:

How do I select all <div> elements which do not contain any <img> elements using jQuery?

回答1:

$('div:not(:has(img))')