Ну как это понимать в контексте кнопки "Выбрать все"?
<div class="upsale__block__sub-right-wrap">
<div class="upsale__block__bot-right__title-wrap dflex">
<div class="upsale__block__bot-right__title dflex">
<input id="floor" type="checkbox" class="block__check" disabled />
</div>
</div>
<div class="upsale__block__bot-right__sub-wrap dnone">
<div class="montage__content-wrap">
<span class="montage__text">intro text where we explain </span>
<div class="montage__floor-wrap montage__comp-wrap dflex">
<div class="montage__floor dflex">
<div class="floor__item-wrap">
<div class="floor__item-inner">
<div class="floor__item">
<input type="checkbox" name="groundfloor" value="groundfloor">
<div class="floor__item__img">
<img src="catalog/view/theme/myown/image/floor/groundFloor.svg" alt="">
</div>
<span class="floor__item__text">floor__item__text 0</span>
</div>
<div class="floor__item">
<input type="checkbox" name="groundfloor" value="groundfloor">
<div class="floor__item__img">
<img src="catalog/view/theme/myown/image/floor/groundFloor.svg" alt="">
</div>
<span class="floor__item__text">floor__item__text 1</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$('div.upsale__block__sub-right-wrap').on('change', 'input', function(e) {
var chk = $(e.delegateTarget).find('input');
if(chk.eq(0)[0]==this) chk.slice(1).prop('checked', this.checked);
else {
var c = chk.slice(1).filter(':checked').length;
chk.eq(0).prop({checked: c, disabled: !c});
}
})
</script>
Где логика в работе этого флажка?