I need to replace a div with another div. Is there a way to place a div on top of another div and then just make that one transparent?
Easy. No need for a framework/library.
parentNode.replaceChild(newNode, oldNode);
If you only have the newNode and the oldNode:
oldNode.parentNode.replaceChild(newNode, oldNode);
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