Advertisement
Guest User

Untitled

a guest
May 25th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. function set_vals(val, name, amount, type, min, max, descp) {
  2. $('#services').append("<option value=\"" + val + "\" amount=\"" + amount + "\" min=\"" + min + "\" max=\"" + max + "\" descp=\"" + descp + "\" type=\"" + type + "\">" + name + " - " + amount * 1000 + " руб</option>");
  3. }
  4.  
  5. function services_typeser() {
  6. calc_result();
  7. var nsval = $('#services').val();
  8. var a = $('[id="services"] option[value="' + nsval + '"]').attr('type');
  9. var m_min = $('[id="services"] option[value="' + nsval + '"]').attr('min');
  10. var m_max = $('[id="services"] option[value="' + nsval + '"]').attr('m_max');
  11. var m_desc = $('[id="services"] option[value="' + nsval + '"]').attr('m_desc');
  12.  
  13. $('#descript_service').show();
  14. $('#descript_service').html(`Описание услуги: `+ m_desc +`
  15. Минимальный заказ: `+ m_min +` Максимальный заказ: `+ m_max +``)
  16.  
  17. if (a == 3) {
  18. $('#dop_input').show();
  19. $('#dop_input2').show();
  20. $('#dop_input3').show();
  21. } else if (a == 4) {
  22. $('#dop_input4').show();
  23. } else {
  24. $('#dop_input').hide();
  25. $('#dop_input2').hide();
  26. $('#dop_input3').hide();
  27. $('#dop_input4').hide();
  28. console.log('');
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement