inputRange.js 432 B

1234567891011
  1. $(document).on('change', ".lu-form-group input[type=range]", function() {
  2. let id = $(this).attr('id');
  3. let val = $(this).val();
  4. let min = $(this).attr('min') ? $(this).attr('min') : 0;
  5. let max = $(this).attr('max') ? $(this).attr('max') : 100;
  6. let newVal = Number(((val - min) * 100) / (max - min));
  7. //$(this).css('background-image', `linear-gradient(to right, #2368AD, #FF0000 ${newVal}%);`);
  8. });