jQuery Callback

The jQuery callback function is executed when the effect completes. Each such method accepts the callback function as a parameter to be executed when the effect is completed. As an example, if we are passing a callback function to the slideToggle() method, the callback function will be executed when the slideToggle effect is completed.


<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    $("p").slideToggle("slow", function(){
            alert("The slideToggle effect is complete");
 <p>This is paragraph tag.</p>
  <button>Click here</button>