title: Rails issue with using Jquery to select only one checkbox from multiple
body: <p>I am aware I should be using radio buttons from a UX standpoint but I was told to use checkboxes. Here is the gist to the HAML: <a href="https://gist.github.com/2701998" rel="nofollow">https://gist.github.com/2701998</a>.</p>
  
  <p>As you can see there is a checkbox for 'Check', a checkbox for 'Credit Card', and then 4 Credit Card options. Ideally the user can only select either Check OR Credit Card, and if they select Credit Card, they can only select one of the four Credit Card types (either Visa, Amex, Discover, or Mastercard).</p>
  
  <p>This is my current code, it's not doing much of anything. Any help is greatly appreciated. </p>
  
  <pre><code>var checkboxes = $(':checkbox.payment-split);
  
  checkboxes.click(function(){
  
    var self = this;
  
    checkboxes.each(function(){
  
      if(this!=self) this.checked = ''
  
    })
  
  })
  </code></pre>