0

I am struggling to find a solution to my current issue where I want to create a JavaScript equivalent to jQuery's .appendTo(). I can only see solutions where it's telling me to create a new div in vanilla JavaScript but my aim is to move an already existing div into another existing div.

<div class="button"></div>
<div class="container"></div>

jQuery(".button").appendTo(".container");

This works how I expect it to in the console but I'm hoping for a vanilla JavaScript equivalent to this solution if possible? Please can anyone help?

kdsla123
  • 39
  • 1
  • 7

0 Answers0