title: Check if a radio button is checked jquery
body: <p>I have this HTML:</p>
  
  <pre><code>&lt;input type="radio" name="test" id="test" value="1"&gt;&lt;br&gt;
  &lt;input type="radio" name="test" id="test" value="2"&gt;&lt;br&gt;
  &lt;input type="radio" name="test" id="test" value="3"&gt;&lt;br&gt;
  
  &lt;input type="button" onclick="CreateJobDo"&gt;
  </code></pre>
  
  <p>When the page loads, none of them will be checked. I want to use jQuery to check if one of the radio buttons is checked when the button is pressed.</p>
  
  <p>I have this:</p>
  
  <pre><code>function CreateJobDo(){
      if ($("input[@name=test]:checked").val() == 'undefined') {
  
          // go on with script
  
      } else {
  
          // NOTHING IS CHECKED
      }
  }
  </code></pre>
  
  <p>But this does not work. How to get it working?</p>