New version of your script is now corrected. I noticed you missed an id selector in your jQuery (#) for discountSelection.
The method now works, but problem is, I'm unsure of how to caculate your math therefor I cannot complete it.
$('#discountselection').hide();
$('#costlabel').hide();
$('#No').click(function() {
$('#discountselection').hide();
$('#costlabel').hide();
});
$('#Yes').click(function() {
$('#discountselection').show();
$('#costlabel').show();
});
$("#discountselection").change(function() {
var selected_value = $("#discountselection option:selected").val();
alert("Selected Value = " + selected_value);
var discount = {1: 12, 2: 24, 3: 36};
var package_prices = {'standard': 45, 'premium': 85, 'platinum': 134 };
var cost = 2; //package_prices[package] * discount[discountselection];
alert("Cost " + cost);
$("#costlabel").val(cost);
});
Where does 'package' and 'discountSelection' come from. answer those and this'll be done for you.
package_prices[package] * discount[discountselection];