» Table Of Contents
Adding color to an Event
Section 3.2.5
The 6th parameter of the fscEvent function is an optional string containing a CSS Class Name. This parameter is called the style parameter. If the argument does in fact contain as string (not NULL), then the event is display using the corresponding style from the CSS file stylesheet. For example, see the event below.
fscEvent( 1, 1, 2006, "event with style", null, "scEventRed");
Will display an event on January 1st 2006 with the scEventRed class. This class name is present in the CSS file and contain attributes for controlling the colors of the background and text. Some knowledge of CSS is required to edit the CSS file, so if you don't want to edit the CSS file, you can use the class names provided.
In-line styles are not supported. All styles must referenced by class name and should be placed in the CSS file.
Follow these steps to add new event with custom colors.
(1) In appropiate scrptcal.css file, create new
classnames and styles that you desire.
.CustomColor1 { background-color: #fc9c9c; color: #ffffff; }
(2) Use the new classnames in the 6th parameter of the
fscEvent call.
fscEvent( 1, 1, 2010, "my event", null, "CustomColor1" );
» Table Of Contents