Created
July 7, 2018 15:41
-
-
Save fixable11/2001f19b53611c8c5d322bd5804ceea5 to your computer and use it in GitHub Desktop.
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
//check if the first node is an element node | |
function get_firstChild(n) { | |
var y = n.firstChild; | |
while (y.nodeType != 1) { | |
y = y.nextSibling; | |
} | |
return y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment