$("input.all").click(function(){ var t = $(this); var c = $(':checked', t).length; if (c == 1) { console.log("checked"); } });