It looks like you want to check if at least one of the .container elements is .container .
If so, you can use the :hidden selector and check the length property to see how many have been returned.
$(".showall").click( function () { if ($(".container:hidden").length)
If you want to check if everyone was hidden, use the :visible selector as follows:
$(".showall").click( function () { if ($(".container:visible").length)
source share