Javascript examples for jQuery Method and Property:slideDown
Call function after slide down 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").slideUp(1000, function(){ console.log("The slideUp() method is finished!"); });//www . java 2s. co m }); $(".btn2").click(function(){ $("p").slideDown(1000, function(){ console.log("The slideDown() method is finished!"); }); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button class="btn1">Slide up</button> <button class="btn2">Slide down</button> </body> </html>