I have heard few approaches:
However, I am confused on how to do 2. What is the best way to move all child element from div A to div B without iterating over all of them.
You can also use document fragment which appends all at one moment
var fragment = document.createDocumentFragment();
fragment.appendChild(...)
fragment.appendChild(...)
...
element.appendChild(fragment)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With