I would like to use 2 selects to change the value of the total price.
<span id="totalprice">$10</span>
<select id="upgrade1">
<option value="10">A</option>
<option value="20">B</option>
</select>
<select id="upgrade2">
<option value="10">C</option>
<option value="20">D</option>
</select>
So for example selecting B and D the total price would reflect $40.
This is my jQuery I have so far, but I do not know what goes into the addition part...
$('#upgrade1, #upgrade2').on('change', function() {
$('#totalprice').text($(this).val());
});
How do I do the jQuery addition part?