title: Message is poping each time for unselected radio button
body: <p>I am using jquery to showing message with next button if all the question with radio button not answer but when i use below code message is coming every time when i am clicking next button.I have added HTML code also which have multiple choice question with radio button.If user not able to answer any question than after clicking next button the message will appear.But the message should not show each time clicking next button if question is not answer.</p>
  <p>HTML:-</p>
  <pre><code>    &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;div class=&quot;section-1-questions&quot;&gt;
    &lt;div style=&quot;background-color:greenyellow;&quot;&gt; &lt;b&gt;Section 1:&lt;/b&gt; &lt;/div&gt;&lt;br&gt;
    &lt;fieldset class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;row1&quot;&gt;
        &lt;div class=&quot;question1&quot;&gt;
          &lt;legend id=&quot;q1&quot; class=&quot;col-form-label col-sm-8 pt-0&quot;&gt;&lt;b&gt;1) Question 1&lt;/b&gt;&lt;/legend&gt;
          &lt;div class=&quot;col-sm-10 answers&quot;&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;fieldset class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;row1&quot;&gt;
        &lt;legend id=&quot;q2&quot; class=&quot;col-form-label col-sm-8 pt-3&quot;&gt;&lt;b&gt;2) Question 2&lt;/b&gt;&lt;/legend&gt;
        &lt;div class=&quot;col-sm-10 answers&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;fieldset class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;row1&quot;&gt;
        &lt;legend id=&quot;q3&quot; class=&quot;col-form-label col-sm-8 pt-3&quot;&gt;&lt;b&gt;3) Question 3&lt;/b&gt;&lt;/legend&gt;
        &lt;div class=&quot;col-sm-10 answers&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;fieldset class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;row1&quot;&gt;
        &lt;legend id=&quot;q4&quot; class=&quot;col-form-label col-sm-8 pt-3&quot;&gt;&lt;b&gt;4) Question 4&lt;/b&gt;&lt;/legend&gt;
        &lt;div class=&quot;col-sm-10 answers&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;fieldset class=&quot;form-group&quot;&gt;
      &lt;div class=&quot;row1&quot;&gt;
        &lt;legend id=&quot;q5&quot; class=&quot;col-form-label col-sm-8 pt-3&quot;&gt;&lt;b&gt;5) QUESTION 5&lt;/b&gt;&lt;/legend&gt;
        &lt;div class=&quot;col-sm-10 answers&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;div class=&quot;form-group&quot;&gt;
      &lt;label for=&quot;remarks&quot;&gt;&lt;b&gt;Remarks / Observations &lt;/b&gt;&lt;/label&gt;
      &lt;input type=&quot;name&quot; class=&quot;form-control&quot; name=&quot;Remarks1&quot; id=&quot;remarks1&quot; aria-describedby=&quot;nameHelp&quot; placeholder=&quot;Please enter your Remarks / Observations&quot;&gt;
      &lt;small id=&quot;nameHelp&quot; class=&quot;form-text text-muted&quot;&gt;Please enter your Remarks / Observations about these questions.&lt;/small&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;a class=&quot;btn btn-primary btnPrevious&quot;&gt;Previous&lt;/a&gt;
  &lt;a class=&quot;btn btn-primary btnNextS1&quot;&gt;Next&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>JS:-</p>
  <pre><code> $(document).ready(function() {
    let ctr = 1;
    $('.answers').each(function(index) {
      let i = index + 1
      let html = ` &lt;div class=&quot;form-check-inline section-1&quot;&gt;
      &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;question${i}&quot; id=&quot;gridRadios${ctr}&quot; value=&quot;1&quot;&gt;
      &lt;label class=&quot;form-check-label&quot; for=&quot;gridRadios${ctr}&quot;&gt; Never&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-check-inline section-1&quot;&gt;
      &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;question${i}&quot; id=&quot;gridRadios${ctr}&quot; value=&quot;2&quot;&gt;
      &lt;label class=&quot;form-check-label&quot; for=&quot;gridRadios${ctr}&quot;&gt;Rarely&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-check-inline section-1&quot;&gt;
      &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;question${i}&quot; id=&quot;gridRadios${ctr}&quot; value=&quot;3&quot;&gt;
      &lt;label class=&quot;form-check-label&quot; for=&quot;gridRadios${ctr}&quot;&gt;Occasionally&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-check-inline section-1&quot;&gt;
      &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;question${i}&quot; id=&quot;gridRadios${ctr}&quot; value=&quot;4&quot;&gt;
      &lt;label class=&quot;form-check-label&quot; for=&quot;gridRadios${ctr}&quot;&gt;Often&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-check-inline section-1&quot;&gt;
      &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;question${i}&quot; id=&quot;gridRadios${ctr}&quot; value=&quot;5&quot;&gt;
      &lt;label class=&quot;form-check-label&quot; for=&quot;gridRadios${ctr}&quot;&gt;Always&lt;/label&gt;
      &lt;/div&gt;
  
      &lt;div class=&quot;form-group&quot;&gt;
      &lt;input type=&quot;button&quot; name=&quot;q${i}Remark&quot; value=&quot;Remark&quot; onclick=&quot;onButtonClick(${i})&quot; /&gt;
      &lt;input class=&quot;hide&quot; type=&quot;text&quot; id=&quot;textInput${i}&quot; value=&quot;&quot; oninput=&quot;updateTextBox()&quot; /&gt;
      &lt;p&gt;Remaining Characters: &lt;span id=&quot;chars-left&quot;&gt;100&lt;/span&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group&quot;&gt;
      &lt;button name=&quot;disable${i}&quot; id=&quot;na${i}&quot; class='btn-na'&gt;N/A&lt;/button&gt;
      &lt;/div&gt;
      `
      $(this).html(html);
      ctr++;
    })
  
       $('.btnNextS1').click(function() {
          if ($('div.row1:not(:has(:radio:checked)):not(:has(input[disabled]))').length) {
            $('div.row1:not(:has(:radio:checked)):not(:has(input[disabled]))').parent().after(&quot;&lt;div class='validation' style='color:red;margin-bottom: 20px;'&gt;Please Answer this question&lt;/div&gt;&quot;);
          } else {
            //e.stopPropagation();
            console.log('valid');
            $('ul.nav-tabs li.nav-item a.active').closest('li').next('li').find('a').trigger('click');
          }
        });
  </code></pre>