stop

UK[st?p] US[stɑ:p]

vi. 停止; 中斷; 停止; (させる) 作業(yè)を停止する

vt. 停止; ブロック; ブロック; 支払い停止

n.stop; (オルガン) 音停止; 停止; (オルガン) 音パイプ

jquery stop() メソッド 構(gòu)文

関數(shù): stop() メソッドは、現(xiàn)在実行中のアニメーションを停止します。

構(gòu)文: $(selector).stop(stopAll,goToEnd

パラメータ:

      <source id="bk4k1"><dfn id="bk4k1"></dfn></source>
        パラメータDescription
        stopAll オプション。選択した要素のキューにあるすべてのアニメーションを停止するかどうかを指定します。
        #goToEnd オプション?,F(xiàn)在のアニメーションの完了を許可するかどうかを指定します。このパラメータは、stopAll パラメータが設(shè)定されている場合にのみ使用できます。

        jquery stop() メソッド 例

        <html>
        <head>
        <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
        <script type="text/javascript"> 
        $(document).ready(function(){
          $("#start").click(function(){
            $("#box").animate({height:300},2000);
            $("#box").animate({height:100},2000);
          });
          $("#stop").click(function(){
            $("#box").stop();
          });
        });
        </script>
        </head>
         
        <body>
        
        <p><button id="start">Start Animation</button><button id="stop">Stop Animation</button></p>
        
        <div id="box" style="background:#98bf21;height:100px;width:100px;position:relative">
        </div>
         
        </body>
        </html>
        インスタンスの実行 ?

        [インスタンスの実行] ボタンをクリックしてオンライン インスタンスを表示します