Example 1 — Go Then .finish()
Official pattern: chain three .animate() steps, then jump to the combined end state.
$("#go").on("click", function () {
$("#box")
.clearQueue()
.stop()
.css({ marginLeft: 0, opacity: 1, fontSize: 16 })
.animate({ marginLeft: 120 }, 2000)
.animate({ opacity: 0.3 }, 2000)
.animate({ fontSize: 28 }, 2000);
});
$("#finish").on("click", function () {
$("#box").finish();
}); How It Works
- Reset.
clearQueue().stop()clears any prior run. - Chain. Three
.animate()calls enqueue onfx. - Finish. Active + queued steps jump to their end CSS.

