jQuery radio button selection check in each loop
<p>i have the following jquery code which checks radio buttons and hide or show the associated warning box when none of the radio buttons are selected in each group.</p>

<p>However when i run the code, it takes values of the first checked radio and assigned it to all values of radio buttons (even if they are not selected).</p>

<p>so when i select only the 8th group of radio buttons with a value of 4, in the console i get </p>

<p>6 is checked: 4<br>
7 is checked: 4<br>
8 is checked: 4</p>

<p>but it should print
oh no
oh no
8 is checked: 4</p>

<p>can you help me about this issue?</p>

<p>Thanks.</p>

<pre><code>    $.each(checkboxers, function(_, q)
    {
        var warnbox = $('.q' + q);
        if (!!$("input[@name='answer" + q + "']:checked").val()) {
            console.log(q + ' is checked.' + $("input[@name='answer" + q + "']:checked").val());
            warnbox.hide();
        } else {
            console.log('oh no!');
            err = true;
            warnbox.show();
        }
    });
</code></pre>
