该值只会在刷新页面时更新,但我的想法是在移动指针时更新值。
我使用this plugin,但我认为这是基于jQuery UI滑块。
在我的代码有:当指针移动
<script type="text/javascript">
$(function(){
$("#SliderSingle").slider({
from: 400,
to: 2000,
step: 2.5,
round: 1,
scale: ['400€', '600€', '800€', '1000€', '1200€', '1400€',
'1600€', '1800€', '2000€'],
dimension: ' €',
skin: "round",
slide: function(event, ui){
$("#amount").val('$' + ui.value);
}
});
$("#amount").val('$' + $("#SliderSingle").slider("value"));
});
</script>
唯一的问题只是更新值。
http://jqueryui.com/demos/slider/#events检查出的变化事件 – tester 2011-04-13 01:13:39