Código:
<!DOCTYPE html> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <script> $(document).ready(function(){ $(button).click(function(){ $(div).slideToggle("slow"); }); }); </script> </head> <body> <h1 id="button">Toggle slideUp() and slideDown()</h1> <p id="div">This is a paragraph.</p> </body> </html>