Last active
October 1, 2016 19:46
-
-
Save englishextra/c19556b7a61865e3631cc879aaeb314e to your computer and use it in GitHub Desktop.
Adds Element AFTER NeighborElement
This file contains hidden or 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
/*! | |
* Adds Element AFTER NeighborElement | |
* gist.github.com/englishextra/c19556b7a61865e3631cc879aaeb314e | |
* @param {String|object} e HTML Element to append after | |
* @param {Object} a target HTML Element | |
* appendAfter(e,a) | |
*/ | |
var appendAfter=function(e,a){var p=a.parentNode||"",s=a.nextSibling||"";p&&s&&p.insertBefore(e,s);return!1;}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment