小编Dri*_*ver的帖子

带有 slideStop 事件的 Bootstrap 滑块

我的页面上有一个引导滑块。我不知道如何更改此代码,在拖动滑块时 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)

javascript jquery slider

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

javascript ×1

jquery ×1

slider ×1