Last active
August 29, 2015 14:25
-
-
Save kylebakerio/ff9417323783b8132d11 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
var getElementsByClassName = function(className){ | |
var output = []; | |
var childAdd = function(aNode) { | |
if (_.contains(aNode.classList, className)) { | |
output.push(aNode) | |
} | |
if (aNode.childElementCount > 0) { | |
_.each(aNode.childNodes, function(val){ | |
childAdd(val) | |
}) | |
} | |
} | |
childAdd(document); | |
return output; | |
}; |
no longer psuedocode... just dysfunctional code. Pretty sure the idea is sound, though. Just still don't understand html elements in javascript. Now to start experimenting, I guess.
bam. Wow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rewriting from scratch. psuedocode.