:: Documentation >>

setClass Method

Sets CSS selector.

Syntax

obj.setClass(name, value);

Parameters

nameStringSelector name.
valueString/FunctionSelector value.

Remarks

The selector string is composed from the three parts - the prefix ('active'), the name and the value, separated by the '-' character. Normally the object class string consists of several selectors separated by space.

Selector values are stored and inherited separately within the object. This function allows easy access to single selector value without parsing the whole class string.

The following example adds 'active-template-list' stylesheet selector to the object class.

Example

obj.setClass("template", "list");

See Also

Active.System.HTML

Comments

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