Answer the question
In order to leave comments, you need to log in
Running svg animation from js?
There is an svg animation that is triggered by a button like this
begin="group1.click"// тут запуск этой анимация при нажатие на кнопку group1
<g id="group1" transform="translate(-400 0)">
<rect id="btn" x="398" y="448" width="48" height="18" rx="5" fill="#d3d3d3" stroke="grey" />
<text id="txt1" x="402" y="460" font-size="10" font-weight="600" > Выстрел </text>
</g>
btn115=document.createElement( 'BUTTON'); // создание кнопки
btn115.id='cmd888';
btn115.innerText = "Запуск анимации";
document.getElementById("container").appendChild(btn115); // нужно чтобы добавилось
btn115.onclick=function(){
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question