Javascript examples for jQuery Method and Property:css
chains together the css(), slideUp(), and slideDown() methods.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("#p1").css("color", "red") .slideUp(2000)/*from w w w . j a va 2 s. co m*/ .slideDown(2000); }); }); </script> </head> <body> <p id="p1">jQuery is fun!!</p> <button>Click me</button> </body> </html>