我试图通过mobiscroll为价格和价格2输入元素设置轮子中的2个值但不知道如何使其工作。
知道我怎么能这样做吗?
$('#price').mobiscroll({
theme: 'mobiscroll',
display: 'bottom',
maxWidth: [$(document).width() / 2, $(document).width() / 2],
wheels: [
[{
keys: [100, 200, 300, 400],
values: ["100", "200", "300", "400"]
}, {
keys: [100, 200, 300, 400],
values: ["100", "200", "300", "400"]
}]
],
formatResult: function(data){
return data[0];
},
});
$('#price').click(function() {
$('#price').mobiscroll('show');
});
$('#price').mobiscroll('setValue', data[0], true);
$('#price2').mobiscroll('setValue', data[1], true);
我已将代码添加到http://jsfiddle.net/95ns1c2v/3/