If I set to autoplay there is no hover function. It just plays once and then stops.
Correct, unless you check the option *Loop animation*, then the animation will continuously play in a loop.
If I set to mouse enter it doesn’t play on page load.
Correct, because the mouse enter event is the trigger to start the animation.
It seems to just play once on mouse enter but not if you hover again.
Please do not mix up these two things: (1) the animation playing once or in a loop and (2) what happens on mouse leave if *Trigger* is set to *Mouse Enter*.
About (1): If *Loop animation* is not checked, the animation will only play once until its last frame (or until the frame defined by the settings in *Animation End*). If *Loop animation* is checked though, the animation will start over again.
About (2): If *On Mouse Leave* is set to *Continue* (and *Trigger* is set to *Mouse Enter*), the animation will start playing when the mouse enters the animation and continue to play, no matter whether the mouse leaves the animation or not. If *On Mouse Leave* is set to *Pause* (and *Trigger* is set to *Mouse Enter*), the animation will start playing when the mouse enters the animation and pause when the mouse leaves the animation. When the mouse enters the animation, it will continue playing and stop again when the mouse leaves the animation.
On the Lottie element demo page under Demo 3, you will find an example that has checked the option *Loop animation* and set *On Mouse Leave* to *Pause*.
I’m a bit confused on the code. You would put that in the Yootheme script field? Generally with javascript I would use the script field.
No, the instructions refer to the file /wp-content/plugins/herzog-dupont/includes/modules/elements/elements/hd-lottie/js/hd-lottie.js
, I didn’t express that clearly, sorry.