1
我有一個jQuery UI滑塊,從0到100,默認開始是50.我想知道如何創建一個額外的簡單文本框,打印3個不同的選項之一取決於滑塊的用戶價值。基本上,如果範圍在0-33之間,那麼文本框會讀取(簡單),如果範圍從34-66,它將讀取(平均),67-100讀取(硬)。其他文本框,根據JQuery UI滑塊值而變化
這是目前我的代碼:
<script>
$(".slider3").slider({
animate: true,
range: "min",
value: 50,
min: 0,
max: 100,
step: 1,
//this gets a live reading of the value and prints it on the page
slide: function(event, ui) {
$("#slider-result3").html(ui.value);
},
});
</script>
請幫助,因爲我一直在試圖弄清楚這一點了好幾個小時。
哇。不敢相信我沒有看到。非常感謝約翰。 – user1011713