jQuery UI Sliders - Select overlapping sliders based on dragging direction

前端 未结 7 1525
猫巷女王i
猫巷女王i 2021-01-02 11:27

I have this simple jQuery UI Slider setup with a range and a two default values that overlap. The entire thing (with a few bells and whistles) can be found in this jsfiddle:

7条回答
  •  清酒与你
    2021-01-02 12:05

    I tried Yi Jiang's solution with 1.8.12 and it broke on a slider with a single handle, but worked perfectly after I changed

    this._originalVal = this.values();
    

    to

    this._originalVal = this.options.values === null ? this.value() : this.values();
    

提交回复
热议问题