:: Home >>

setClass

Sets the value of the CSS class.

Syntax

obj.setClass(name, value);

Parameters

name (string) - class name
value (string or function) - class value

Remarks

Calling setClass(name, value) will assign the CSS class aw-name-value which can be referred in stylesheet via

.aw-name-value {
    ...
}

The value parameter can be a function, which will be called each time the html is generated (in toString() or refresh() methods), for example

obj.setClass("state", function(){
    return this.getControlProperty("state");
});

See also

getClass() method

Comments

4 Mar 06
AW.HTML.DIV:setClass bug? Eric (3)

Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5