Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Hide Paragraphs One by One on Each Click</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <style> body { font-family: Arial, sans-serif; padding: 20px; } button { padding: 10px 15px; margin-right: 10px; background: #007acc; color: #fff; border: none; border-radius: 4px; cursor: pointer; } button:hover { background: #005fa3; } p { padding: 10px; background: #f0f0f0; margin: 5px 0; } </style> </head> <body> <h2>Hide Paragraphs One by One with Each Click</h2> <p>This is the first paragraph.</p> <p>This is the second paragraph.</p> <p>This is the third paragraph.</p> <button id="hideBtn">Hide Paragraph</button> <button id="resetBtn">Reset</button> <script> $(function() { $("#hideBtn").on("click", function() { $("p:visible").first().fadeOut(400); }); $("#resetBtn").on("click", function() { $("p").show(); }); }); </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