I have literally spent hours trying to fix this but cant! Like the title sais, the following code works in everything except Firefox!
HTML
<div class="bottom">
<fieldset>
<ul>
<li>
<label>
<input type="radio" name="fronts" class="config-inp-cha" value="1" checked="checked" />
Buckets w/ adj headrests
($<div class="price-config">179.97</div>)
</label>
</li>
</ul>
</fieldset>
</div><!--bottom-->
JavaScript Description: pretty simple, I am grabbing the value of the price-config div in reference to the checked value. This return NaN in firefox, but works in every other browser! PLzzz help
$(document).ready(function()
{
var fronts_price = parseFloat($("input[name=fronts]:checked").next('.price-config').html());
alert(fronts_price);
});
Have you tried using the
<label>tag correctly?http://www.w3schools.com/tags/tag_label.asp