I am newbie within the programming!Please assist me!!!I’ve the svg animation file and i need when i click on the button on my web site the svg will play.
Nevertheless it give me the difficulty:TypeError: svgObject.beginElement isn’t a perform.
right here is my code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>svg</title>
</head>
<physique>
<object sort="picture/svg+xml" id="svganimate" start="indefinite" knowledge="pattern.svg"></object>
<button onclick="playAnimation()">Play Animation</button>
<script>
perform playAnimation() {
var svgObject = doc.getElementById('svganimate');
svgObject.beginElement();
}
</script>
</physique>
</html>
Can somebody assist me please!