-2

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?

  • 4
    Does this answer your question? [Create
    and append
    dynamically](https://stackoverflow.com/questions/14004117/create-div-and-append-div-dynamically)
    – Mark Jul 21 '20 at 10:27

1 Answers1

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