-1
我在設置jQuery滑塊時出現問題,並確保它與我的其他元素保持良好排列(當涉及垂直間隔/定位並保持一致性)。另外,它現在只是作爲[對象對象]出現。關於如何解決這個問題的任何想法?這是我到目前爲止的代碼:http://jsfiddle.net/dhExk/1/jQuery滑塊顯示爲[object object]並且不排隊
HTML
<div style="padding-top: 10px; text-align: center; font-size: 12px;">
<div align="left" style="padding-bottom: 20px">
<div style="padding-bottom: 10px">
<div style="padding-bottom: 10px; font-size: 16px">Search By:</div>
<div style="padding-bottom: 10px;">
<div class="modal_field2">Park:</div>
<select>
<option selected="selected">Any</option>
</select>
</div>
<div class="modal_field2">Building:</div>
<select>
<option selected="selected">Any</option>
</select>
</div>
<div class="modal_field2">Room Type:</div>
<select>
<option selected="selected">Any</option>
</select>
</div>
<div class="modal_field2" style="text-align: left">No of Students:</div>
<div style="display: inline-block; padding-bottom: 20px; float: right">
<input type="text" id="amount" style="border: 0; color: #000; background-color: #fff; font-size: 12px;" disabled="disabled"/>
</div>
</div>
CSS
.modal_field2 {
width: 100px;
float: left;
padding-top: 3px;
}
JS
$(function() {
$("#slider").slider({
value: 50,
min: 20,
max: 400,
step: 10,
slide: function(event, ui) {
$("#amount").val("" + ui.value);
}
});
$("#amount").val("" + $("#slider").slider("value"));
});