как я могу заставить 5-ую коробку работать с «отмечен» или «не отмечен»?
var price_1_startup = 800;
var price_1 = 0;
function upgrade_1(str) {
if (str == 1) {price_1 = 0;}
else if (str == 2) {price_1 = +125;}
else if (str == 3) {price_1 = +200;}
else if (str == 4) {price_1 = +325;}
$("#price_1").hide().html(price_1_startup+price_1).fadeIn('slow');
}
function checkbox() {
$("#price_1").hide().html(price_1_startup+1500).fadeIn('slow');
}
<input type="radio" name="upgrade1" value="1" onclick="upgrade_1(this.value);" checked="checked" /><br>
<input type="radio" name="upgrade1" value="2" onclick="upgrade_1(this.value);" /><br>
<input type="radio" name="upgrade1" value="3" onclick="upgrade_1(this.value);" /><br>
<input type="radio" name="upgrade1" value="4" onclick="upgrade_1(this.value);" /><br>
<input type="checkbox" name="upgrade1" value="5" onclick="checkbox(this.value);" /><br>