此處選擇的值是代碼如何讓這個jQuery滑塊
<script>
$(".slider").slider({
animate: true,
range: "min",
value: 0,
min: 0,
max: 4,
step: 1,
//this gets a live reading of the value and prints it on the page
slide: function(event, ui) {
if(ui.value ==0)
$("#slider-result").html("Poor");
else if(ui.value == 1)
$("#slider-result").html("Average");
else if(ui.value == 2)
$("#slider-result").html("Good");
else if(ui.value == 3)
$("#slider-result").html(" Very Good");
else if(ui.value == 4)
$("#slider-result").html("Excellent");
},
//this updates the hidden form field so we can submit the data using a form
change: function(event, ui) {
$('#hidden').attr('value', ui.value);
}
});
</script>
此滑塊創建一個jQuery滑塊和顯示「優威固特好可憐」等。在選擇。現在我需要得到滑塊的選擇如何做到這一點的價值????