1

是否有可能以 ui.value 作为参数调用 jQuery UI 滑块元素之外的函数?

我现在这样做的方式:

 $("#id").slider({  
slide: function(event,ui) {
$("#another_id").val(ui.value);
...other statements...
}
});

这是我试图解决问题的方式,但是当我尝试这个时,滑块小部件的句柄不会移动......:

function insertValue(value) {
$("#another_id").val(value);
...other statements...
}

$("#id").slider({   
slide: function(event,ui) {
insertValue(ui.value);
}
});

谢谢!

4

0 回答 0