Добрый день!
По чему выдает одну и ту же сумму, хотя значения стоят другие?
<select class="jq-selectbox__select bath sum tip" name="bumaga" >
<option value="3">Белый мелованный картон</option>
<option value="3" >Белая матовая</option>
<option value="4" >Лен белый</option>
<option value="4" >Лен глянцевый</option>
<option value="4">Woodstok</option>
<option value="5">Маджестик 250г/м2</option>
<option value="5" >Sirio 250г/м2</option>
<option value="5" >Shyne 250г/м2</option>
<option value="5" >Nettuno 250г/м2</option>
<option value="5">Tintoretto 250г/м2</option>
<option value="5" >Constellation 250г/м2</option>
<option value="5" >Acquerello 250г/м2</option>
<option value="5" >Splendorlux 250г/м2</option>
<option value="7" >Sirio 350г/м2</option>
<option value="10" >Touch cover светлый</option>
<option value="12" >Touch cover темный</option>
</select>
<select class="jq-selectbox__select bath tirazh" id="tirazh" name="tirazh">
<option value="" data-defolt="300" data-len="400" data-disign="500" data-sirio="700" data-coversvet="1000" data-coverdark="1200">100шт</option>
<option value="" data-defolt="500" data-len="700" data-disign="900" data-sirio="1400" data-coversvet="2000" data-coverdark="2400">200шт</option>
<option value="" data-defolt="750" data-len="1050" data-disign="1350" data-sirio="2366" data-coversvet="3000" data-coverdark="3600">300шт</option>
<option value="" data-defolt="920" data-len="1320" data-disign="1720" data-sirio="2730" data-coversvet="4000" data-coverdark="4800">400шт</option>
<option value="" data-defolt="1000" data-len="1500" data-disign="2000" data-sirio="3250" data-coversvet="5000" data-coverdark="6000">500шт</option>
<option value="" data-defolt="1200" data-len="1800" data-disign="2400" data-sirio="3900" data-coversvet="6000" data-coverdark="7200">600шт</option>
<option value="" data-defolt="1330" data-len="2030" data-disign="2730" data-sirio="4550" data-coversvet="7000" data-coverdark="8400">700шт</option>
<option value="" data-defolt="1440" data-len="2240" data-disign="3040" data-sirio="4960" data-coversvet="8000" data-coverdark="9600">800шт</option>
<option value="" data-defolt="1530" data-len="2430" data-disign="3330" data-sirio="5580" data-coversvet="9000" data-coverdark="10800">900шт</option>
<option value="" data-defolt="1700" data-len="2700" data-disign="3700" data-sirio="6000" data-coversvet="10000" data-coverdark="12000">1000шт</option>
</select>
var tip
var summa = 0;
var defolt = $('.tirazh option:selected').data('defolt');
var len = $('.tirazh option:selected').data('len');
var disign = $('.tirazh option:selected').data('disign');
var sirio = $('.tirazh option:selected').data('sirio');
var coversvet = $('.tirazh option:selected').data('coversvet');
var coverdark = $('.tirazh option:selected').data('coverdark');
$('.tirazh').change(function(){
defolt = $('.tirazh option:selected').data('defolt');
len = $('.tirazh option:selected').data('len');
disign = $('.tirazh option:selected').data('disign');
sirio = $('.tirazh option:selected').data('sirio');
coversvet = $('.tirazh option:selected').data('coversvet');
coverdark = $('.tirazh option:selected').data('coverdark');
});
if(tip){
if (tip == 3) {
tip = defolt
}
if (tip == 4) {
tip = len
}
if (tip == 5) {
tip = disign
}
if (tip == 7) {
tip = sirio
}
if (tip == 10) {
tip = coversvet
}
if (tip == 12) {
tip = coverdark
}
}