📌  相关文章
📜  从 jquery 中的 ionRangeSlider 获取值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:03.355000             🧑  作者: Mango

代码示例1
var $range = $(".js-range-slider"),
    $inputFrom = $(".js-input-from"),
    $inputTo = $(".js-input-to"),
    instance,
    min = 0,
    max = 1000;

$range.ionRangeSlider({
    type: "double",
    min: min,
    max: max,
    from: 100,
    to: 900,
    onStart: updateInputs,
    onChange: updateInputs,
    onFinish: updateInputs
});

function updateInputs (data) {
    $inputFrom.prop("value", data.from);
    $inputTo.prop("value", data.to);
}

instance = $range.data("ionRangeSlider");