Documentation
Utility Functions
Method | Description | Remarks | Example |
---|---|---|---|
setEditTable( id, startRow, config ) | Calls EditTable constructor and returns the EditTable object:
|
var et = setEditTable('myTableId', 2, { editable: true }); |
|
Get(id) | this is a
|
var myElm = et.Get('myId'); |
|
Tag(o, tagname) | this is just a
It returns an array |
var myTables = et.Tag(document, 'table'); |
|
GetText(n) | returns the text of given a node and its child nodes:
|
var tableText = et.GetText( et.Tag(document,'table' )[0]); |
|
CreateElm(tag) | creates an html element with defined attributes:
|
var myInput = et.CreateElm( 'input', ['id','myId'], ['value','Hello
world'] ); |
|
CreateText(t) | this is just a
|
var myText = et.CreateText( 'Hello world' ); |
|
IsArray(obj) | checks if passed param is an array. It returns a boolean |
alert(et.IsArray([1,2,3])); |
|
IsObj(obj) | checks if passed param is an object. It returns a boolean |
alert(et.IsObj({ text: 'hello'})); |
|
IsFn(fn) | checks if passed param is a function. It returns a boolean |
alert(et.IsFn(function(){ var a=0; })); |