<!DOCTYPE html> <html> <head> <title></title> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function() { $("button").click(function(){ $("p").slideToggle('slow'); }); }); </script> </head> <body> <p>hello 1</p> <p>hello 2</p> <button>toggle</button> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more