Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#btn1").click(function(){ $("#p1").fadeToggle(2500) }); $("#btn2").click(function(){ $("#p2").fadeToggle("slow","linear"); }); $("#btn3").click(function(){ $("#p3").fadeToggle("fast"); }); }); </script> </head> <body> <button id="btn1">fadeToggle() milliseconds</button> <button id="btn2">fadeToggle() slow</button> <button id="btn3">fadeToggle() fast</button> <p id="p1">This is a paragraph that takes 2500 milliseconds to fade out and in.</p> <p id="p2">This is a slow, linear paragraph.</p> <p id="p3">This is a fast paragraph.</p> </body> </html>
Result:
W3Schools.com - Try it yourself