With native JavaScript:
newelement = element.cloneNode(bool)
where the Boolean indicates whether to clone child nodes or not.
Here is the complete documentation on MDN.
With native JavaScript:
newelement = element.cloneNode(bool)
where the Boolean indicates whether to clone child nodes or not.
Here is the complete documentation on MDN.