如何从JQuery中的Range Slider获取值 - IonRangeSlider?

时间:2015-09-01 09:20:46

标签: jquery slider rangeslider

如何通过更改滑块获取ion.rangeSlider组件的值?

这是我的jQuery代码:

function rangeSlider() {
var $range = $(".js-range-slider");
$range.ionRangeSlider({
    type: "single",
    min: 0,
    max: 5,
   // from: 0,
    grid: true,

}); }

1 个答案:

答案 0 :(得分:0)

您应该使用内置回调来执行此操作(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"); ):http://jsfiddle.net/IonDen/gefkwqv6/

//main.cpp
qDebug() << "main::instance = " << qApp; //0x29fe18
//lib.cpp
qDebug() << "library::instance = " << GetModuleHandle(NULL); // 0x400000