linb.domaddClass ( str )
Add a class to dom attribute..
str: String. Class name.
addEventHandler ( name, flag )
To add event handler named name.
name: String. Handler name.
addFirst ( target )
To add a specific dom node as its first child.
target: Dom node. Node to be added.
addLast ( target )
To add a specific dom node as its last child.
target: Dom node. Node to be added.
addNext ( target )
To add a specific dom node as its next brother.
target: Dom node. Node to be added.
addPre ( target )
To add a specific dom node as its previous brother.
target: Dom node. Node to be added.
attach ( target )
To attach a specific dom node as its last child.
target: Dom node. Node to be added.
attr ( key, value )
To get or set attribute of dom.
Sample -
attr('width','0'): set width = 0
attr('width'): get width
attr('width',null): try to remove width
attr({width:3,height:4})
busy ( flag )
To make DOM node in busy status.
canFocus ( )
To determine whether this node call be focused on
empty ( flag )
To make innerHTML empty.
free ( )
To make DOM node in free status.
gc ( )
This function is for Garbage Collection in IE6
getRegion ( flag, parent )
To get a rectangle for DOM node.
returns: Object. Sample -{left:0,top:0,width:100,height:100}
hasClass ( str )
To determine whether there exists specfic class name dom attribute.
str: Class name.
returns: Boolean.
html ( str, flag )
To set inner html.
str: String. Inner html.
outerHTML ( str )
To set outer html.
str: String. Outer html.
reClass ( reg, replace )
To replace sub string in class name with another string.
reg: Regular expression.
replace: String. The string to replace with.
remove ( flag )
To remove the node itself standing for.
flag: Boolean. If set to true, more action will be taken to free memory.
removeClass ( str )
To remove a class from dom attribute.
str: String. Class name.
removeEvent ( name, event_id, flag )
Sample.
removeEvent('onClick','idforthisclick')
removeEvent('onClick') will remove all onClick in linb.cache.dom.id.events.
removeEvent('onClick',null,true) will remove all onClick/beforeClick/afterClick in linb.cache.dom.id.events.
removeEventHandler ( name )
To remove event handler with specific name.
name: String. Handler name.
replace ( target, flag )
To replace a node itself standing for with a specific dom node.
target: Dom node. Node to replace with.
setRegion ( hash, flag, force )
To set a rectangle for DOM node.
hash: Object. Sample -{left:0,top:0,width:100,height:100}
swap ( target )
To swap a node itself standing for and a specific dom node.
target: Dom node. Node to be swapped.
text ( str )
To set html text.
str: String. Html text.