I want to control the keyframe of lottie animation to stop at specific position on click and return back to the start position on the second click. I’ve tried all the methods on the usage page of lottie, but it won’t work.
This is some of the methods I tried.
document.getElementById("nav__btn-lottie").addEventListener("click", () => {
navLottieControl.load({
frame: 11,
pause: true,
speed: 2,
src: "https://lottie.host/03db8d3b-a829-45ee-95e1-17c52f057ae6/XdnKtdqfZ7.json",
});
});