How to check if a div is visible state or not?

前端 未结 7 2101
不知归路
不知归路 2020-12-24 12:11

I have tabs like this.

  • //content
  • Trying to check it like

    7条回答
    •  轻奢々
      轻奢々 (楼主)
      2020-12-24 12:50

      Add your li to a class, and do $(".myclass").hide(); at the start to hide it instead of the visibility style attribute.

      As far as I know, jquery uses the display style attribute to show/hide elements instead of visibility (may be wrong on that one, in either case the above is worth trying)

    提交回复
    热议问题