我有两个数组,一个数组是价格滑块的值,其中它们是两个值,一个是起始值,另一个是滑块的结束值,我想检查滑块开始值和结束值之间的价格和值,请查看截图
作为起始值和结束值的滑块代码
$(function() {
$( "#slider-range" ).slider({
range: true,
min: 0,
max: 200,
values: [ 1, 50 ],
slide: function( event, ui ) {
$( "#amount" ).text( "$" + ui.values[ 0 ] + "-$" + ui.values[ 1 ] );
collection.filterPrice(event, ui, getPriceTags());
}
});
$( "#amount" ).text( "$1" + "-$" + $( "#slider-range" ).slider( "values", 1 ) );
});
出滑块
我想要的结果是
if slider value is from 10 to 50 so this checks the into the array
if any of the value is in between these 10 to 50 so it gives the result 20 50
or
if slider value is 10 to 60 so the results should be 20 50 and 50 to 100
拉丁的传说
繁花如伊
富国沪深
相关分类