Last active
October 1, 2016 19:47
-
-
Save englishextra/ad6b0ed6aa934434ddbb65d3a60ba28f to your computer and use it in GitHub Desktop.
Adds Element BEFORE NeighborElement
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
/*! | |
* Adds Element BEFORE NeighborElement | |
* gist.github.com/englishextra/ad6b0ed6aa934434ddbb65d3a60ba28f | |
* @param {String|object} e HTML Element to prepend before | |
* @param {Object} a target HTML Element | |
* prependBefore(e,a) | |
*/ | |
var prependBefore=function(e,a){var p=a.parentNode||"";p&&p.insertBefore(e,a);return!1;}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment