I have tabs like this.
//content
Trying to check it like
is(':visible') checks the display property of an element, you can use css method.
is(':visible')
display
css
if (!$("#singlechatpanel-1").css('visibility') === 'hidden') { // ... }
If you set the display property of the element to none then your if statement returns true.
none
if
true