title: how to do a javascript confirm dialog if a radio button is checked, with jquery
body: <p>I have two radio buttons like so</p>
  
  <pre><code>&lt;input type="radio" name="rush" value="yes" /&gt;
  &lt;input type="radio" name="rush" value="no" checked="checked" /&gt;
  </code></pre>
  
  <p>What I want to do is when the form submit button is clicked, check if 'yes' is selected.</p>
  
  <p>If it is, show a javascript confirm dialog</p>
  
  <p>I've gotten this far, but am stuck, any help would be appreciated.</p>
  
  <pre><code>$("form.shipping").submit(function() {
  
      if($("input[name='rush']".attr("value") === "yes")
      {
          if (confirm("Rush orders are subject to an upcharge. (Just wanted to make sure you read the note). Is this ok?"))
          {
              return true;
          }
          else
          {
              return false;
          }
      }
  
  });
  </code></pre>