title: Select all radio buttons in list-Jquery
body: <p>I have a list that has 2 radio buttons against it. I need to randomly select radio buttons in that list. Each radio button (rb1: yes and rb2: no) has different ids. Here's my code.</p>
  
  <pre><code>$("#rbList").each(function () {                                                                
              var radios = $(this).find("input[type=radio]");
              if (radios.length &gt; 0) {
                  var randomnumber = Math.floor(Math.random() * radios.length);
                  $(radios[randomnumber]).trigger('click');
              }
          });
  </code></pre>
  
  <p>This works to select one radio button in the group. What I  don't understand is how to loop it to randomly select all the radio buttons in the list (be it either <strong>yes</strong> or <strong>no</strong>). What do I have to add? Also, I need to automate that. Like just hit enter in console and it should reflect on the page. Any help is greatly appreciated. Thank you.</p>