Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>jQuery removeClass() Multiple Classes Example</title> <style> body { font-family: Arial, sans-serif; padding: 40px; background-color: #f5f5f5; } h1 { color: #333; } .box { width: 120px; height: 120px; margin-top: 20px; background-color: #ccc; border: 2px solid #999; border-radius: 4px; box-shadow: none; transition: all 0.3s ease; } .rounded { border-radius: 50%; } .bg-orange { background-color: #FF9800; } .shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); border: none; } button { margin-top: 20px; padding: 10px 20px; background-color: #d32f2f; color: #fff; border: none; border-radius: 4px; cursor: pointer; } button:hover { background-color: #b71c1c; } </style> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> </head> <body> <h1>Remove Multiple Classes from an Element</h1> <p>This example demonstrates how removing multiple classes from an element affects its appearance. The box starts with rounded corners, an orange background, and a shadow. Clicking the button removes all these effects.</p> <div id="myBox" class="box rounded bg-orange shadow"></div> <br/> <button id="removeClassesBtn">Remove Classes</button> <script> $(document).ready(function(){ $('#removeClassesBtn').click(function(){ $('#myBox').removeClass('rounded bg-orange shadow'); }); }); </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