Start Lottie animation on click

hi there

I need help please

im trying to start my custom lottieanimation with a button click… the hole animation should also be hidden at the beginning when the page loads… after the button click the animation appears and the animation always starts at frame 1

right now after the button click the animation starts at any frame and not on the first frame…it seems that the animation runs in a loop when hidden at the beginning . I don’t want that to happen

what I want is the animation to be hidden and stop playing after the button click it should show up and start playing at from frame 1

code I have right now is
export function buttonclick
$w (‘#’).show()

please help me somebody … THANK YOU