S
S
Sergey But2019-07-07 17:48:25
HTML
Sergey But, 2019-07-07 17:48:25

How to set the same Lottie animation to different containers?

For some reason, this code does not insert animation into the second container element?

var params = {
        container: document.getElementById('lottie'),
        renderer: 'svg',
        loop: true,
        autoplay: true,
        animationData: animationData
    };
    var param = {
        container: document.querySelector('.lottie'),
        renderer: 'svg',
        loop: true,
        autoplay: true,
        animationData: animationData
    };
 
    var anim = lottie.loadAnimation(params, param);
        anim.setSpeed(0.04)

How to insert the same animation on the same page but in different containers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BandFourse, 2019-07-09
@BandFourse

margin: 0px

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question