<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>fadeOut demo</title> <style> p { font-size: 150%; cursor: pointer; } </style> <script src="https://code.jquery.com/jquery-3.6.3.js"></script> </head> <body> <p> If you click on this paragraph you'll see it just fade away. </p> <script> $( "p" ).click(function() { $( "p" ).fadeOut( "slow" ); }); </script> </body> </html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter