1
这个问题,更新为真正的答案(感谢@siva)显示范围滑块值VAL输入(项目范围滑块)(解决)
这是展示项目的范围内VAL输入片断
DEMO:JS Bin
HTML:
<div id="slider"></div>
<input id="legend">
JS:
var items =[ 'student','bachelor','masterstudent',' PHD'];
var s = $("#slider");
s.slider({
range: true,
min:1,
max:items.length,
values: [ 2, 3 ],
slide: function(event, ui) {
var curr_val = ui.values[ 0 ]-1;
var prev_val = ui.values[ 1 ]-1;
$("#legend").val(" since " + items[curr_val] + " to " + items[prev_val]);
}
});
$("#legend").val(" since " + items[1] + " to " + items[2]);
出什么把你想要exactely,因为只有在你的代码串 – Zl3n
我想展示里面输入值。当滑动到第二项时,单身汉出现在输入中作为val。像http://jsbin.com/qibiyakaqi/1/edit?html,js,output – fraweb
@fraweb(http://ionden.com/a/plugins/ion.rangeSlider/demo_interactions.html)检查此链接..和见range_45 – Gayathri