jQuery stop() Method

Total Post:5

Points:35
JQuery 
 286  View(s)
Ratings:
Rate this:

I want jquery script to stop sliding.I don't know which method is use for

<style> 
#panel, #flip {
    padding: 5px;
    font-size: 18px;
    text-align: center;
    background-color: #555;
    color: white;
    border: solid 1px #666;
    border-radius: 3px;
}
#panel {
    padding: 50px;
    display: none;
}
</style>
</head>
<body>
<button id="stop">Stop</button>
<div id="flip">Start sliding </div>
<div id="panel">Mindstick software</div>
</body>
</html>

  1. Post:9

    Points:63
    Re: jQuery stop() Method

    Use this script code it will resolve your problem

    <script> 
    
    $(document).ready(function(){
        $("#flip").click(function(){
            $("#panel").slideDown(5000);
        });
        $("#stop").click(function(){
            $("#panel").stop();
        });
    });
    </script>

Answer