Why isn\'t this working? Similar code works here: http://www.ralphphillips.com/youtube/stick-figure/stick-figure2.html
But this isn\'t working. I have the html code
I would try this http://jsfiddle.net/EFWf5/1:
$("form#order :input[type=radio]").each(function(){
$(this).bind('change', function() {
checkOptions();
});
});
var checkOptions = function () {
var total = 0;
var pack = parseInt($('input[name=pack]:checked', '#order').val());
var accomp = parseInt($('input[name=accomp]:checked', '#order').val());
if (!isNaN(pack)) total += pack;
if (!isNaN(accomp)) total += accomp;
$('#total').text(total);
$('#title').text($('input[name=pack]:checked', '#order').attr('title'));
};
Total: 0
Title: