Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function set_vals(val, name, amount, type, min, max, descp) {
- $('#services').append("<option value=\"" + val + "\" amount=\"" + amount + "\" min=\"" + min + "\" max=\"" + max + "\" descp=\"" + descp + "\" type=\"" + type + "\">" + name + " - " + amount * 1000 + " руб</option>");
- }
- function services_typeser() {
- calc_result();
- var nsval = $('#services').val();
- var a = $('[id="services"] option[value="' + nsval + '"]').attr('type');
- var m_min = $('[id="services"] option[value="' + nsval + '"]').attr('min');
- var m_max = $('[id="services"] option[value="' + nsval + '"]').attr('m_max');
- var m_desc = $('[id="services"] option[value="' + nsval + '"]').attr('m_desc');
- $('#descript_service').show();
- $('#descript_service').html(`Описание услуги: `+ m_desc +`
- Минимальный заказ: `+ m_min +` Максимальный заказ: `+ m_max +``)
- if (a == 3) {
- $('#dop_input').show();
- $('#dop_input2').show();
- $('#dop_input3').show();
- } else if (a == 4) {
- $('#dop_input4').show();
- } else {
- $('#dop_input').hide();
- $('#dop_input2').hide();
- $('#dop_input3').hide();
- $('#dop_input4').hide();
- console.log('');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement