Comparing version 0.2.4 to 0.2.5
@@ -196,14 +196,25 @@ (function (JSUS) { | ||
DOM.getTextInput = function (id, attributes) { | ||
var mt = document.createElement('input'); | ||
mt.id = id; | ||
mt.setAttribute('type', 'text'); | ||
return this.addAttributes2Elem(mt, attributes); | ||
}; | ||
DOM.getTextInput = function (id, attributes) { | ||
var ti = document.createElement('input'); | ||
if ('undefined' !== typeof id) ti.id = id; | ||
ti.setAttribute('type', 'text'); | ||
return this.addAttributes2Elem(ti, attributes); | ||
}; | ||
DOM.addTextInput = function (root, id, attributes) { | ||
var ti = this.getTextInput(id, attributes); | ||
return root.appendChild(ti); | ||
}; | ||
DOM.getTextArea = function (id, attributes) { | ||
var ta = document.createElement('textarea'); | ||
if ('undefined' !== typeof id) ta.id = id; | ||
return this.addAttributes2Elem(ta, attributes); | ||
}; | ||
DOM.addTextArea = function (root, id, attributes) { | ||
var ta = this.getTextArea(id, attributes); | ||
return root.appendChild(ta); | ||
}; | ||
DOM.addTextInput = function (root, id, attributes) { | ||
var ti = this.getTextInput(id, attributes); | ||
return root.appendChild(ti); | ||
}; | ||
DOM.getCanvas = function (id, attributes) { | ||
@@ -210,0 +221,0 @@ var canvas = document.createElement('canvas'); |
{ | ||
"name": "JSUS", | ||
"description": "JavaScript UtilS. Collection of general purpose functions. JSUS helps!", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"keywords": [ "util", "general", "array", "eval", "time", "date", "object"], | ||
@@ -6,0 +6,0 @@ "author": "Stefano Balietti <futur.dorko@gmail.com>", |
44379
1272