gpt4 book ai didi

jquery-ui slider 从代码更新值

转载 作者:行者123 更新时间:2023-12-04 23:30:15 27 4
gpt4 key购买 nike

我从代码更新 slider 值时遇到问题。我试过了

$('#slider').slider('value', newValue);
$('#slider').val(newValue).slider();
$('#slider').val(newValue).slider('refresh');

没有结果

任何其他建议

最佳答案

这是一个示例代码

Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle.



代码示例
Initialize a slider with the value option specified.
$( ".selector" ).slider({ value: 37 });
Get or set the value option, after init.
//getter
var value = $( ".selector" ).slider( "option", "value" );
//setter
$( ".selector" ).slider( "option", "value", 37 );

关于jquery-ui slider 从代码更新值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6131970/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com