How do I create new elements through javascript?

Hello Everyone,

Let me just start off by saying that I’m still kind of a newbie to coding in general but I’m trying to learn. That being said I want to try to figure out how to take a reusable element that I have created and create new ones using javascript. The functionality is that they want to have an editor where people can click a button and it will create a new instance of that reusable element. However, there will be multiple types of these elements. So for example, if I click a button that says add square it will add a square, if I click a button that says add a triangle it will add a triangle on my editor page. I was thinking that JavaScript might be the answer, and I would just use JavaScript and HTML. But I’m having a hard time trying to do that. Is there any other way I can do this? Or am I just not understanding something.

This topic was automatically closed after 70 days. New replies are no longer allowed.