function TextBox(config){ var self = this; self.id = config.id; // Create DOM self.dom = document.createElement("div"); self.dom.className = "object"; self.dom.classList.add("fader"); self.dom.classList.add("textbox"); // All the text boxes, yo self.boxes = config.boxes; // Create each textbox... for(var i=0; i