radio button ID value
<p>I have a radio group where I need to do some math calculations based on the value of the radio selected, but I also need a way to know my identity value for the SQL record it represents. Normally I would have that stored in the "value" attribute of the radio button. </p>

<p>What I tried to do here is have different ID's for the same class, and I am trying to figure out how to determine the ID assigned</p>

<pre><code>&lt;input type="radio" class="price" name="price" value="20.00" checked="true" id="1" /&gt;
&lt;input type="radio" class="price" name="price" value="385.00" id="2" /&gt;
&lt;input type="radio" class="price" name="price" value="504.00" id="3" /&gt;

$('.price').change(function() {
calculate();
});

function calculate () {
    var q = $('input#quantity').val();
    var p = $("input[name=price]:checked").val();
    var tot = ((q*p)+parseInt(s));
    $('input#total').val(tot);
};
</code></pre>

<p>So in the calculate() function, I get the value but how can I get the ID for the radio button checked? Maybe this is backwards and there is a better way to get my dollar value for the math calculation part and I am open to any suggestions.</p>

<p>TIA - Dan</p>
