我正在尝试实现jquery-ui-slider。我有一个文本框和更新按钮...每当用户点击更新按钮时,滑块拇指移动到文本框中指定的位置。但是,之后,这样做滑块拇指停止滑动。为什么会这样?怎么解决这个? 我目前的代码是:
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#slider { margin: 20px; }
</style>
<script>
$(document).ready(function () {
$("#slider").slider(
{
min: 0,
max: 100,
step: 1,
slide: showValue
});
$("#update").click(function () {
$("#slider").slider("option", "values", $("#seekTo").val());
});
function showValue(event, ui) {
$("#val").html(ui.value);
}
});
</script>
</head>
<body>
<div id="slider"></div>
Seek To : <input id="seekTo" type="text" value="10" />
<input id="update" type="button" value="Update" />
Current Value : <span id="val">0</span>
</body>
</html>
答案 0 :(得分:1)
您应该设置$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;
$contentService.ClientRequestServiceSettings.MaxReceivedMessageSize = -1
$wcfServiceSettings = New-Object Microsoft.SharePoint.Administration.SPWcfServiceSettings
$wcfServiceSettings.ReaderQuotasMaxStringContentLength = 2147483647
$wcfServiceSettings.ReaderQuotasMaxArrayLength = 2147483647
$wcfServiceSettings.ReaderQuotasMaxBytesPerRead = 2147483647
$wcfServiceSettings.MaxReceivedMessageSize = 2147483647
$wcfServiceSettings.MaxBufferSize = 2147483647
$wcfServiceSettings.ReaderQuotasMaxDepth = 2147483647
$wcfServiceSettings.ReaderQuotasMaxNameTableCharCount = 2147483647
$contentService.WcfServiceSettings["<my service name>.svc"] = $wcfServiceSettings
$contentService.Update($true)
而不是value
:
values
这是一个有效的例子:
$("#slider").slider("option", "value", $("#seekTo").val());
&#13;
$(document).ready(function () {
$("#slider").slider(
{
min: 0,
max: 100,
step: 1,
slide: showValue
});
$("#update").click(function () {
$("#slider").slider("option", "value", $("#seekTo").val());
});
function showValue(event, ui) {
$("#val").html(ui.value);
}
});
&#13;
#slider { margin: 20px; }
&#13;