How to get selected radio value using Jquery
<p>Hi i want to get radiobutton value using jquery. This is the radiobutton code. The period[count] naming is because the radiobutton is loop in array using javascript</p>

<pre><code>&lt;input type='radio' name='period["+count+"]' value='1' checked/&gt;Full&lt;input type='radio' name='period["+count+"]' value='0.5'/&gt;Half (AM)&lt;input type='radio' name='period["+count+"]' value='0.5'/&gt;Half (PM)
</code></pre>

<p>Question is how do i get the total value of the checked radio button?I try this code but it give only the first value of checked radio button</p>

<pre><code>var values2 = $("input:radio[name='period[2]']").val();
var values3 = $("input:radio[name='period[3]']").val();
</code></pre>

<p><strong>Edited</strong></p>

<p>This is the code to solve this problem thanks to <strong>Aaron Saunders</strong></p>

<pre><code>var x = 0;
    $("input:radio[name^='period']:checked").each(function(){
    x = x + parseFloat($(this).val());
    });
</code></pre>
