Professional Javascript Components
:: Documentation >>

setClass

Sets the value of the CSS class.

null

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 {
    ...
}
Show example

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

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

Get the new version

ActiveWidgets 2.6.4 Free Trial
     IE, Firefox, Safari, Opera, Chrome
     iOS, Android, Windows 8.1
     Released Jan 7, 2014

Documentation: