简体   繁体   English

$ .noUiSlider垂直滑块,最大值位于顶部,最小值位于底部

[英]$.noUiSlider vertical slider with max value at top and min value at bottom

$.noUiSlider slider is not working properly while making it vertical and trying to get max value at top and min at bottom using direction option. $ .noUiSlider滑块在使其垂直并尝试使用“方向”选项尝试在顶部获得最大值和在底部获得最小值时无法正常工作。 here is the code below 这是下面的代码

noUiSlider.create(document.getElementById('slider-range'), {
  start: [20, 50],
  direction: 'rtl',
  orientation: 'vertical',
  tooltips: [true,true],
  range: {
    'min': [ 10 ],
    'max': [ 90 ]
  }});

This is the output i'm getting 这是我得到的输出

You should try without [ and ] that surrounds your min and max values : 您应该尝试在最小和最大值周围不要使用[和]:

   noUiSlider.create(document.getElementById('slider-range'), {
      start: [20, 50],
      direction: 'rtl',
      orientation: 'vertical',
      tooltips: [true,true],
      range: {
        'min': 10,
        'max': 90
      }})

Demonstration here : https://codepen.io/andreds/pen/BJdYqx 此处演示: https : //codepen.io/andreds/pen/BJdYqx

More details and documentation here : https://refreshless.com/nouislider/ 此处有更多详细信息和文档: https : //refreshless.com/nouislider/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM