jquery submit form problem
<p>I have a form with radio buttons in it. Before the form submits I need to check that 10 radio buttons are checked. This code does the trick (i.e. I get the alert back when 10 have been checked) but I can't work out where to put my <code>return true</code> and <code>return false</code> statements to stop it or let it submit if my count has reached 10.</p>

<pre><code>  $('.submit').click(function () {
      var radios = $(':radio');
      var count = 0;
      $.each(radios, function () {
          if ($(this).is(':checked')) {
              count++;
              alert(count);
          }

          if (count === 10) {
              alert('hi')
              return true;
          }
      })
      return false;
})
</code></pre>

<p>At the moment the <code>return false</code> at the bottom stops the form submitting even when the count is 10 but I need to return <code>false</code> in there to stop the form submitting right away.</p>

<p>Hope this makes sense.</p>
