Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery Animate Card Example</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <style> body { font-family: Arial, sans-serif; background: #f9f9f9; margin: 0; padding: 40px; display: flex; flex-direction: column; align-items: center; } #card { position: relative; width: 200px; height: 150px; background-color: #4a90e2; color: white; padding: 20px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); opacity: 1; transition: background-color 0.3s ease; } #card h3 { margin: 0 0 10px; } #card p { font-size: 14px; } #animateBtn { margin-top: 30px; padding: 10px 20px; font-size: 16px; background-color: #333; color: white; border: none; border-radius: 5px; cursor: pointer; } #animateBtn:hover { background-color: #555; } </style> </head> <body> <div id="card"> <h3>Animated Card</h3> <p>This card will move, fade, and resize using jQuery.</p> </div> <button id="animateBtn">Run Animation</button> <script> $(document).ready(function() { $('#animateBtn').click(function() { $('#card') .animate({ left: '+=100px', opacity: 0.75 }, 600) .animate({ width: '300px', height: '200px' }, 800) .animate({ left: '-=100px' }, { duration: 400, easing: 'swing', complete: function() { alert('Animation sequence finished!'); } }); }); }); </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