Codelab Editor
Free Online HTML Editor
Run
Learn jQuery
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>jQuery stop() Example – Jump to End</title> <style> body { font-family: Arial, sans-serif; padding: 2rem; background: #f5fdf7; } h2 { color: #2f855a; } #panel { width: 100px; height: 100px; background: #38b2ac; margin-bottom: 1rem; line-height: 100px; color: white; text-align: center; position: relative; } .buttons { display: flex; flex-direction: column; gap: 1rem; width: fit-content; } button { padding: 0.5rem 1rem; background: #2f855a; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px; } button:hover { background: #276749; } </style> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> </head> <body> <h2>jQuery stop() – Jump to End</h2> <p>This example uses <kbd>stop(false, true)</kbd> to jump to the end of the current animation without clearing any animations in the queue. They will continue after the jump.</p> <div id="panel">Box</div> <div class="buttons"> <button id="startAnimBtn">Start Animation</button> <button id="jumpToEndBtn">Jump to End</button> </div> <script> $(document).ready(function(){ $('#startAnimBtn').click(function(){ $('#panel').css({ left: 0, top: 0, width: '100px' }) .animate({ left: '250px' }, 1000) .animate({ top: '80px' }, 1000) .animate({ width: '250px' }, 1000); }); $('#jumpToEndBtn').click(function(){ // Jump to end of current animation, keep queue $('#panel').stop(false, true); }); }); </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