select elements using display:block

前端 未结 8 2122
旧巷少年郎
旧巷少年郎 2021-01-20 15:52

This is the html content from which I want to select all elements inside report having display block using jQuery $(\"#report:visible\") does not work for me.

8条回答
  •  南方客
    南方客 (楼主)
    2021-01-20 16:25

    Why not just

    $('#report div:visible');
    

    if markup stays like that it will work. If not just add a class to the report entries like 'entry' then do

    $('#report .entry:visible');
    

提交回复
热议问题