Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>jQuery Fade Effects Example</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <style> body { font-family: Arial, sans-serif; padding: 20px; } #box { width: 200px; height: 100px; background: #e91e63; color: #fff; display: none; /* Initially hidden */ display: flex; align-items: center; justify-content: center; margin-bottom: 20px; } button { padding: 10px 15px; margin: 5px; background: #007acc; color: #fff; border: none; border-radius: 4px; cursor: pointer; } button:hover { background: #005fa3; } </style> </head> <body> <h2>jQuery Fade Effects Example</h2> <p>Click the Button To Experience jQuery Fade Effects.</p> <div id="box">Box</div> <button id="fadeInBtn">Fade In</button> <button id="fadeOutBtn">Fade Out</button> <button id="fadeToggleBtn">Fade Toggle</button> <button id="fadeToBtn">Fade to 50%</button> <script> $(function() { $("#fadeInBtn").on("click", function() { $("#box").fadeIn(500); }); $("#fadeOutBtn").on("click", function() { $("#box").fadeOut(500); }); $("#fadeToggleBtn").on("click", function() { $("#box").fadeToggle(500); }); $("#fadeToBtn").on("click", function() { $("#box").fadeTo("slow", 0.5); }); }); </script> </body> </html>
Editor Commands
Ctrl
F
Find
Ctrl
G
Find Next
Ctrl
⇧
G
Find Previous
Ctrl
⇧
F
Find & Replace
Ctrl
]
Indent Code Right
Ctrl
[
Indent Code Left
⇧
Tab
Auto Indent Code
Ctrl
/
Line Comment
Ctrl
Alt
/
Block Comment
TutsInsider Actions
Alt
S
Run Code
Ctrl
C
Copy Editor Code
Ctrl
A
Select All Editor Code
Ctrl
S
Save/Download
Ctrl
Alt
X
Rotate
Ctrl
Alt
T
Switch Theme
Ctrl
⇧
C
Open Console
Esc
Close Console