0
我使用jQuery滑塊和嘗試使用HTML5 data-
方法將數據傳遞給它,但它的失敗數據 - *信息:收集與jQuery
HTML:
<div class="editSlider" data-min="-20" data-max="20" data-editValue="curValB"></div>
JQuery的
$(".editSlider").slider({
value: 0,
min: $(this).data("min"),
max: $(this).data("max"),
step: 0.1,
slide: function(event, ui) {
$(this).data("editValue") = ui.value;
$(this).find('.ui-slider-handle').text(Math.round(curValB));
},
stop: function(event, ui) {
$(this).data("editValue") = ui.value;
this.doSomething();
}
});
我得到這個錯誤檢查:
ReferenceError: invalid assignment left-hand side
$(this).data("editValue") = ui.value;
任何想法我做錯了什麼?