New course! Every coder should learn Generative AI!
Try a free lesson+ 2
How to change polygon's points using JavaScript's DOM?
Im coding another web design that has a triangle in it. Points "75 400, 275 300, 275 400". Now I have to make it into points "80 500, 250 275, 250 300". I tried making the code out of this, I read twice about the JavaScript Lessons, but when I tried it over 10 times, nothing happened. Even if I added setInterval() and window.onload in it. How do I turn a polygon's shape into something? Code: https://code.sololearn.com/WTaILEcCX5pl/?ref=app
2 Answers
+ 2
Element.setAttribute method
https://code.sololearn.com/Wi0KuT2lZzGx/?ref=app
also, demo viewbox attribute of svg for you.
+ 2
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app