Need to use jQuery.find to find element with specific style

前端 未结 7 1366
天命终不由人
天命终不由人 2021-01-01 10:28

Right... I need to find all < ul style=\"display: block;\"> elements, so that I can set it do display:none.

I think I\'m on the right path here... but not quite t

7条回答
  •  时光取名叫无心
    2021-01-01 10:46

    $('#adminMenu li').find("ul:visible").css('display', 'none');
    

    or

    $('#adminMenu li').find("ul:visible").hide();
    

    or

    $('#adminMenu li ul:visible').hide();
    

    to name a few ways

提交回复
热议问题