JSFiddle - React, Tailwind, and code Playground

HTML

<div class="answer" id="yesOptions">
    <input type="checkbox" />
    <input type="checkbox" />
    <input type="checkbox" />
    <input type="checkbox" />
</div>
<button>check</button>

JavaScript

$('button').click(function(){

    var checkedboxes = $('#yesOptions :checkbox:checked').length;

    if (checkedboxes === 0){
        alert('At least 1 checkbox must be checked from this div!');
    }
});