Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Created July 16, 2017 13:36
Show Gist options
  • Save vanaf1979/19cc0048b802fa40ec84c263124acd9e to your computer and use it in GitHub Desktop.
Save vanaf1979/19cc0048b802fa40ec84c263124acd9e to your computer and use it in GitHub Desktop.
Wrap an ellement with another
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