HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery hide() Method</h1> <p>hide() method with callback.</p> <button id="myHide">Hide</button> <button id="myShow">Show</button> <script> $(document).ready(function(){ $("#myHide").click(function(){ $("p").hide(2000, "linear", function(){ alert("show() method completed"); }); }); $("#myShow").click(function(){ $("p").show(); }); }); </script> </body> </html>
OUTPUT
×

Save as Private