sudhakarinfotech
(current)
Run Code
Live Code Editor- jQuery Effect Without Callback Function
Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>jQuery Effect Without Callback Function</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style> div{ width:160px; height:160px; background-color:green; color:white; font-size:25px; line-height:160px; text-align:center; position:relative; } .btn-animate{ padding:12px 15px; background-color:black; color:white; font-size:20px; border:none; border-radius:5px; } </style> <script> $(document).ready(function(){ $(".btn-animate").click(function(){ $(".animated-box").hide("slow"); alert("The slide toggle effect has completed."); }); }); </script> </head> <body> <h1>jQuery Effect Without Callback Function</h1> <button class="btn-animate">Start Animation</button> <div class="animated-box"><p>Animation</p></div> </body> </html>
Source Code Output :
Running