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

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

I have tabs like this.

  • //content
  • Trying to check it like

    7条回答
    •  感动是毒
      2020-12-24 12:42

      You can use .css() to get the value of "visibility":

       if( ! ( $("#singlechatpanel-1").css('visibility') === "hidden")){
       }
      

      http://api.jquery.com/css/

    提交回复
    热议问题