Is there a way to test if a certain element (.container) is hidden, in a whole document? Such as (which doesn’t work properly):
$(".showall").click(
function () {
if ($(".container").is("hidden"))
{perform a task}
else
{return false;}
});
It sounds like you want to test if at least one of the
.containerelements is hidden.If so, you can use the
:hiddenselector, and check thelengthproperty to see how many were returned.If you wanted to test to see if all were hidden, use the
:visibleselector like this: