Skip to content

Instantly share code, notes, and snippets.

View acreeger's full-sized avatar

Adam Creeger acreeger

  • Engineering Manager, Facebook
  • New York, NY
View GitHub Profile
@acreeger
acreeger / gist:1056051
Created June 30, 2011 11:35
buildTree - tt.fm
buildTree: function(tree, containers) {
var type = $.type(tree);
if (type == "string" || type == "number") {
return document.createTextNode(String(tree));
}
if (type != "array") {
return tree;
}
var elemDescriptor = tree[0];
var cssClasses, elemId, containerKey = [];