SlideUp and SlideDown jQuery
SlideUp and SlideDown jQuery
Using slideUp in Jquery
$("#myPara").slideUp();
Using slideDown in Jquery
$("#myPara").slideDown();
Using slideToggle in Jquery
$("#myPara").slideToggle();
<html> <head> <title> Here is my title </title> <script src="jquery-3.6.0.min.js"> </script> <link rel="stylesheet" href="bootstrap.min.css"> </head> <body> <button id="slideUp">Slide Up</button> <button id="slideDown">Slide Down</button> <p id="myPara" placeholder="Nothing here in this paragraph.">Nothing here in this paragraph. </p> <script> $(document).ready(function(){ $("#slideUp").click(function(){ $("#myPara").slideUp(); }); $("#slideDown").click(function(){ $("#myPara").slideDown(); }); }); </script> </body> </html>