JQuery Show_ withcallback

 

In this example, we are going to show that we are using show method and it applies to the  Appwrk logo image. When we will Click on the button, it will show the logo and alert box which is applied on a callback function.

 
 
 
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <style> img{ width: 500px; height: 200px; display: none; } button{ font-size: 19px; height: 40px; width: 250px; border: 1px solid black; border-radius: 10px; background-color: aqua; } </style> <script> $(document).ready(function(){ $(".showbtn").click(function(){ $("img").show(2000,"swing",function(){ alert("Show() method is finished!"); }); }); }); </script> </head> <body> <h1 style="color:fuchsia">Click to the button and then see</h1> <button class="showbtn">Show Appwrk-logo</button><br> <img src="https://appwrk.com/wp-content/themes/appwrk_theme/images/logo-dark.png"> </body> </html>
Output