Jquery: Execute command, only when all fields of specific pattern are checked
<p>I have a survey with 90 statements, grouped in categories. Easy category has apporximate 10 statements. On each statement the user has to put a score from 0 to 3, presented by radiobuttons. When all statements of a category have a score, the mean has to be calculated.</p>

<p>At the moment I have the calculation, but it's executed after every check of a radio-button and not only when all statements have a score. How can I only execute it after all statements have a score? (and not after giving a score after every statement)</p>

<p>The code for calculating and showing the mean:</p>

<pre><code>var avg = $('input[id^=' + answer[0] + ']:checked').avg();
$('span[id=avg_' + answer[0] + ']').text(avg);
</code></pre>

<p>An example with HTML-code: <a href="http://jsfiddle.net/SFPue/" rel="nofollow">http://jsfiddle.net/SFPue/</a></p>
