当使用touchend或mouseup事件时,如何获取滑块的值? [英] How to get value of the slider, when touchend or mouseup events are used?
本文介绍了当使用touchend或mouseup事件时,如何获取滑块的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$('.ui-slider-handle').live('touchend', function(){
// how can I get slider's value here?
});
$('.ui-slider-handle').live('mouseup', function(){
// and here?
});
我不想使用.change
,因为即使在滑块移动时也会调用它.
解决方案
您可以使用事件stop
http://jqueryui.com/demos/slider/#event-stop >
$('.ui-slider-handle').live('touchend', function(){
// how can I get slider's value here?
});
$('.ui-slider-handle').live('mouseup', function(){
// and here?
});
I don't want to use .change
since it is called even when sliders are moving.
解决方案
You could just use the event stop
http://jqueryui.com/demos/slider/#event-stop
这篇关于当使用touchend或mouseup事件时,如何获取滑块的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文