<title>jQuery Stop Animation Effect</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
$(document).ready(function(){
$("#btn-animate").click(function(){
$("#para-animate").animate({margin:'200px'}, 6000);
$("#btn-stop").click(function(){
$("#para-animate").stop();
<h2>jQuery Stop Animation Effect</h2>
<button id="btn-animate">Click me to Animate</button> <button id="btn-stop">Stop Animate</button>
<div id="para-animate" style="width:50px;height:50px;background:#ccc;margin-top:5px;"></div>