我的页面上有一个引导滑块。我不知道如何更改此代码,在拖动滑块时 page.php 不会一直加载,而只有在我停止拖动它时(在所需的时间段之后)。可能我必须使用 slideStop 事件,但不知道如何使用。
<script type="text/javascript">
$(document).ready(function() {
var intSeconds = 1;
var refreshId;
function sTimeout() {
$("#mydiv").load("page.php"); // load content
refreshId = setTimeout(function() { // saving the timeout
sTimeout();
}, intSeconds *3000);
}
sTimeout();
$.ajaxSetup({cache: false});
// The slider
$("#ex1").slider({
min : 1, // minimum value
max : 20, // maximum value
step : 1,
value : intSeconds, // copy current value
formater: function(value) { // option to format the values before they are sent to the tooltip …Run Code Online (Sandbox Code Playgroud)