Skip to content

Instantly share code, notes, and snippets.

@louisremi
Created August 18, 2011 16:29
Show Gist options
  • Select an option

  • Save louisremi/1154464 to your computer and use it in GitHub Desktop.

Select an option

Save louisremi/1154464 to your computer and use it in GitHub Desktop.
insertAdjacentHTML API
// HTML inserted before elem in the DOM
elem.insertAdjacentHTML( "beforebegin", ... )
// inside elem, before its first child
elem.insertAdjacentHTML( "afterbegin", ... )
// inside elem, after its last child
elem.insertAdjacentHTML( "beforeend", ... )
// HTML inserted after elem in the DOM
elem.insertAdjacentHTML( "afterend", ... )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment