我有这样的标签。
<li id="singlechatpanel-1" style="visibility: hidden;"> //content </li>
试图检查它:
$(".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); }
如果condition总是返回false。如何检查此div的可见性状态?