jquery select all br with display:none;

后端 未结 6 805
梦毁少年i
梦毁少年i 2020-12-15 07:15

How do I select an element based on its css?

I need to select a br with inline style display:none. This is not the same thing as br:hidden, because that selects elem

6条回答
  •  Happy的楠姐
    2020-12-15 07:48

    Use jQuery.map:

    var brs = $('br');
    jQuery.map(brs, function(elem, i){
        if(elem.css('display') == 'none')
            return elem;
        return null;
    });
    

提交回复
热议问题