Javascript examples for jQuery Method and Property:show
Call function after show effect
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".btn1").click(function(){ $("p").hide(1000, function(){ console.log("Hide() method is finished!"); });// w ww .jav a 2s . c om }); $(".btn2").click(function(){ $("p").show(1000, function(){ console.log("Show() method is finished!"); }); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button class="btn1">Hide</button> <button class="btn2">Show</button> </body> </html>