Skip to content

Instantly share code, notes, and snippets.

View middric's full-sized avatar

Rich Middleditch middric

  • Witchert
  • Buckinghamshire
View GitHub Profile
@middric
middric / domBuilder.js
Created July 30, 2012 16:14
domBuilder
var domBuilder = function(h, i, j, k, l) {
while(l=i.shift()) {
if ((j = l[0]) && j.exec) {
k = document.createElement((j+"").split('/')[1]);
for(j in l[1]) {
k[j] = l[1][j]
}
h.appendChild(k);
h = k;
} else {