$('.stlchek input:checkbox').ready(function() { if ($('.stlchek input:checked').length) $(this).parents('.stlchek').css({backgroundColor: 'red'}); else $(this).parents('.stlchek').css({backgroundColor: 'white'}); });