How can I select an element which does not contain a certain child element?

前端 未结 8 1132
抹茶落季
抹茶落季 2020-12-09 09:03

How can I apply jQuery

8条回答
  •  时光取名叫无心
    2020-12-09 09:29

    $(':not(.test:has(.example))').css('color', 'red');​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    

    http://jsfiddle.net/9fkz7y1g/

提交回复
热议问题