jQuery finish() Method Last Updated : 30 Jun, 2023 Suggest changes Share Like Article Like Report The finish() is an inbuilt method in jQuery which is used to stop the animations running at the present time. Syntax: $(selector).finish(); Parameter: It does not accept any parameter. Return Value: It returns the selected element with its final values. jQuery code to show the working of finish() method: html <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> <!-- jQuery code to show the working of this method --> $(document).ready(function() { $("#b1").click(function() { $("div").animate({ height: 200 }, 4000); $("div").animate({ width: 200 }, 4000); }); $("#b2").click(function() { $("div").finish(); }); }); </script> <style> div { background: green; height: 100px; width: 100px; padding: 30px; } </style> </head> <body> <div></div> <p> <!-- this button will start the animation --> <button id="b1">Start </button> <!-- this button will finish the animation --> <button id="b2">Stop</button> </p> </body> </html> Output: Before clicking on the "Start" button- After clicking on the start button animation will start with its specified speed and when stop button is clicked then it immediately finish the animation and return the element to its final height and width value. K kundankumarjha Follow Article Tags : JQuery jQuery-Effects Explore jQuery Tutorial 7 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like