I think the problem is the services selector($services
), you need to in the input element within the .ui.checkbox
element
var $services = $('.service-selection').find('.ui.checkbox input')
also .size()
is deprecated use .length
if ($services.filter(":checked").length > 0) {
$userData.removeClass('hidden');
}
else {
$userData.addClass('hidden');
}