Table of Contents

AddCssClass


AddCssClass(cssClassName : string)

Applies to Workbook Label and Button and can be called in an ExecuteExpression action. Adds the specified CSS class(es) (separated by spaces) to the element if they not already exist.

Example 1 The following statement will add the CSS class "highlight" to the element if it does not already exist.

AddCssClass("highlight");

Example 2 The following statement will add the CSS classes "highlight" and "underline" to the element if they does not already exist.

AddCssClass("hightlight underline");

RemoveCssClass


RemoveCssClass(cssClassName : string)

Applies to Workbook Label and Button and can be called in an ExecuteExpression action. Removes the specified CSS class(es) (separated by spaces) from the element.

Example 1 The following statement will remove the CSS class "highlight" from the element if it exist.

RemoveCssClass("highlight");

Example 2 The following statement will remove the CSS classes "highlight" and "underline" from the element if they exist.

RemoveCssClass("hightlight underline");

ToggleCssClass


ToggleCssClass(cssClassName : string [,condition : Boolean | Eaze expression])

Applies to Workbook Label and Button and can be called in an ExecuteExpression action. Adds or removes one or more classes (separated by spaces), depending on either the class's precense or the value of the condition argument.

Example 1 The following statement will add the CSS class "highlight" to the element if it does not exist, or remove it if it does exist.

ToggleCssClass("hightlight");

Example 2 The following statement will add the CSS class "hightlight" to the element if the condition evaluates to true, otherwise the class will be removed.

ToggleClass("hightlight", X == 250);

Videos