Created
July 16, 2017 13:36
-
-
Save vanaf1979/19cc0048b802fa40ec84c263124acd9e to your computer and use it in GitHub Desktop.
Wrap an ellement with another
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wrap( ellement , wrapper ) | |
{ | |
ellement.parentNode.insertBefore( wrapper , ellement ) | |
wrapper.appendChild( ellement ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment