是或否切换或滑块 [英] Yes or no toggle or slider
本文介绍了是或否切换或滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为我的应用程序找到一个滑块或切换开关,以使用户可以选择是或否,并且难度更大,所以我想找到一个...
I am trying to find a slider or a toggle for my application that allows the user to select yes or no and its harder then i thought to track one down...
我发现了这个滑块,但是它的1或2个数字而不是是或否的文本. ..任何建议
I found this slider but its 1 or 2 numeric and not yes or no text...any suggestions
推荐答案
我们可以对其进行编辑以使其具有类似的内容,
we could edit it to have something like this,
$(function() {
$("#slider-range-max").slider({
range: "max",
min: 0,
max: 1,
value: 0,
slide: function(event, ui) {
$("#amount").val(ui.value?'Yes':'No');
}
});
$("#amount").val($("#slider-range-max").slider("value")?'Yes':'No');
});
这篇关于是或否切换或滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文