Customizable styles and colors

With COOLjsMenu and COOLjsMenu Professional it is possible to customize style for whole submenus and individual items. Different styles can be assigned to usual items and for items that are under mouse cursor.

Style can be described as following (please refer to documentation for fields meaning):

var color = { border:"#666666", shadow:"#DBD8D1", bgON:"white", bgOVER:"#B6BDD2" };
var css = { ON:"styleOn", OVER:"styleOver" };
var SOME_STYLE = { border":1, shadow:2, color:color, css:css };

"styleOn" (for usual items) and "styleOver" (for items under mouse cursor) are usual CSS styles described in the HTML tag <STYLE> or in some separate .css-file.

To specify style for whole submenu, use the folowing construction:

{code:"SubItem 5",
    "sub":[
        {style:SOME_STYLE},
        {code:"SubItem 6"},
        {code:"SubItem 7"}
    ]
}

Submenu of "SubItem 5" will be bound to style SOME_STYLE, i.e. every item of this submenu will inherit this style.

To specify style for individual item, use the folowing construction:

{code:"SubItem 3", format:{style:STYLE_BACKGROUND3}}

Menu item "SubItem 3" will be bound to style STYLE_BACKGROUND3.

Copyright © CoolDev.Com 1997-2007.