face2005,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(function() {
function resultCalc3() {
out.textContent = servisePrice3;
}
let servisePrice3 = 0;
let $css3 = $('#cl-3 .serviceInputBlock input[type="checkbox"]').change(function() {
servisePrice3 = 0;
$css3.filter(':checked').each(function() {
servisePrice3 += $(this).data('calc-value');
});
resultCalc3();
});
$css3.trigger('change');
});
</script>
</head>
<body>
<div id="out"></div>
<div id="cl-3">
<div class="serviceInputBlock">
<input type="checkbox" name="" id="" data-calc-value="5" checked="checked">
<input type="checkbox" name="" id="" data-calc-value="5">
<input type="checkbox" name="" id="" data-calc-value="5">
</div>
</div>
</body>
</html>