берет после 1.01 с 2200, а не с 3200=((
$(function() {
var res = document.getElementById("answer"),
price = {
"ems": 2200,
"avia": 2500,
"sal": 2700,
"parohod": 1800
};
res.innerHTML = price["ems"];
function question() {
var method = $(".find").val();
var weight = +$("#weight").val();
var sum = price[method];
switch(method) {
case 'ems':
if (weight >= .5 && weight <= 1){
for (var i = 50; i < weight * 100; i++) {sum += 20;}
}
else if (weight > 1 && weight <= 2){
for (var i = 100; i < weight * 100; i++) {sum += 18;}
}
break;
case 'avia':
price.innerHTML = avia_price;
break;
case 'sal':
price.innerHTML = sal_price;
break;
case 'parohod':
price.innerHTML = parohod_price;
break;
}
res.innerHTML = sum
}
$('#weight').on("change", question);
$(".find").on("change", question);
});