I have an SVG image loaded in my HTML file and I am trying to rotate one of its path elements, but I'm having trouble figuring out how to do it. The code snippet provided below is not working as expected.
Can anyone provide guidance on how to achieve this?
Thank you
<!DOCTYPE html>
<html>
<head>
<title>Animate</title>
<style>
</style>
<script src="../js/plugin/jquery-2.1.4.min.js"></script>
</head>
<body>
<object data="images/steve/steve.svg" type="image/svg+xml" id="steve" width="100%" height="100%"></object>
<script>
var steve = document.getElementById("steve");
steve.addEventListener("load", function() {
var svgDoc = steve.contentDocument;
var right_arm = svgDoc.getElementById("right_arm");
//right_arm.rotate(90); // THIS DOES NOT WORK
},false);
</script>
</body>
</html>