I have tabs like this.
<li id="singlechatpanel-1" style="visibility: hidden;"> //content </li>
Trying to check it like this:
$(".subpanel a").click(function() { var chatterNickname = $(this).text(); if(!$("#singlechatpanel-1").is(':visible')) { alert("Room 1 is filled."); $("#singlechatpanel-1").css({'visibility':'visible'}); $("#singlechatpanel-1 #chatter_nickname").html("Chatting with: " + chatterNickname); }
If condition always returns false. How can I check visibility state of this div?
$("#singlechatpanel-1").is(':visible');
$("#singlechatpanel-1").is(':hidden');
1.4m articles
1.4m replys
5 comments
56.9k users