I used a query selector to get the div i want to append. But the created div doesn't want to append to anything other than the body. Is there a way i can make it specifically append under the div?
Asked
Active
Viewed 51 times
-2
-
4Does this answer your question? [Createand append– Mark Jul 21 '20 at 10:27dynamically](https://stackoverflow.com/questions/14004117/create-div-and-append-div-dynamically)
1 Answers
1
Look at this: https://www.w3schools.com/jsref/met_node_appendchild.asp What you need to do is
parent.appendChild(thatDiv);

Samuel Dostál
- 139
- 1
- 5