How To Move Html Element
How to move HTML element to another element. Note that, I don't mean moving element's position. Consider this HTML code: ).appendChild( document.getElementById('to_be_moved') )
Solution 2:
Assuming you're working with native DOM elements, the Javascript method .appendChild
will suit your needs.
In native Javascript, document.getElementByID
is probably your best bet in getting the DOM element, so...
var target = document.getElementById('target')
document.getElementById('to_be_moved').appendChild(target)
Post a Comment for "How To Move Html Element"