Search
Control.cssClass Property
See Also
 






Gets or sets the css class of the control.

Namespace: MindFusion.Common
File: Control.js

 Syntax

JavaScript  Copy Code

get cssClass() {}

 Property Value

String. The name of the css class of the control.

 Example

The following code uses the cssClass property to specifies custom classes to Item instances of a schedule.

JavaScript  Copy Code
for (var i = 0; i < 5; i++)
 {
  var item = new p.Item();
  item.startTime = date.clone().addHours(Math.floor(Math.random() * 10) + 6);
  item.endTime = item.startTime.clone().addHours(1);
  var activity = calendar.schedule.resources.items()[0];
  item.subject = activity.name;
  item.resources.add(activity);
  item.cssClass = "itemClass" + activity.id;
  calendar.schedule.items.add(item);
 }

 See Also