jquery.range.js 滑塊


<link rel="stylesheet" href="./css/jquery.range.css">


<div class="ip-son">
<div class="demo">
<input type="hidden" class="single-slider3" value="0"/>
<div class="demo-son2">
<input type="text" class="ipgs" value="0">
</div>
</div>
</div>

<script src="./js/jquery.range.js"></script>
var test;
//ip個數
test = $('.single-slider3').jRange({
//滑塊滑動時 觸發的函數
onstatechange: function () {
$('.ipgs').val($('.single-slider3').val());
},
from: 0,//最小值
to: 1000,//最大值
step: 20,//步進
//這里改變值
scale: [0, 250, 500, 750, 1000],
format: '%s',
width: 500,//總寬度
showLabels: true,
showScale: true
});
$(".ipgs").blur(function () {
test.setValue( $(this).val());//能綁定滑塊的變化
});

這里是設置函數綁定滑塊的變化

return result || this 改成return result || this.data('plugin_' + pluginName);
 
         
         
       


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM