我有点卡住,想知道是否有人能发现原因?它实际上根本没有生成滑块,所以有点丢失。
JSFiddle在这里:http: //jsfiddle.net/DmDkp/
HTML
<div class="markup scoreSlide">
<input type="text" id="" class="scoreID" value="" />
<div class="scoreSlider"></div>
</div>
<div class="markup scoreSlide">
<input type="text" id="" class="scoreID" value="" />
<div class="scoreSlider"></div>
</div>
<div class="markup scoreSlide">
<input type="text" id="" class="scoreID" value="" />
<div class="scoreSlider"></div>
</div>
JS
jQuery(document).ready(function() {
jQuery('.scoreSlide').each(function(){
jQuery(this).find('.scoreID').slider({
animate: true,
range: "min",
value: value: jQuery('.scoreID').val(),
min: 1,
max: 5,
step: 1,
slide: function(event, ui) {
jQuery(this).find('.scoreSlider').html(ui.value);
},
});
});
});