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

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

I have tabs like this.

  • //content
  • Trying to check it like

    7条回答
    •  小蘑菇
      小蘑菇 (楼主)
      2020-12-24 12:57

      if (!$('#singlechatpanel-1').css('display') == 'none') {
         alert('visible');
      }else{
         alert('hidden');
      }
      

    提交回复
    热议问题