0
(function ($) {
    $(document).ready(function () {

        $('#road').pan({ fps: 30, speed: 9 });

        $('#city2').pan({ fps: 30, speed: 2 });

        $('#city3').pan({ fps: 30, speed: 5 });

        $('#sky').pan({ fps: 30, speed: 0.5 });

        $('#plane1').sprite({ fps: 10, no_of_frames: 8 });

        $('#stop').click(function () {
            $('#body').stop();
            $('#city2').stop();
            $('#city3').stop();
            $('#sky').stop();
            $('#road').stop();
        });

    });
});

这是我的代码,你能告诉我如何阻止我的城市和道路移动吗?我尝试使用停止,但它不起作用。

4

1 回答 1

0

你试过了吗:

.stop(true)

代码:

    $('#stop').click(function () {
        $('#body').stop(true);
        $('#city2').stop(true);
        $('#city3').stop(true);
        $('#sky').stop(true);
        $('#road').stop(true);
    });
于 2013-10-28T04:55:23.427 回答