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

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

How can I apply jQuery

8条回答
  •  离开以前
    2020-12-09 09:40

     $('.test').each(function() {
        if(!$(this).children().hasClass("example")){
           //your code
        }
    }); 
    

    Maybe like this? I haven't tested this...

提交回复
热议问题