JavaScript.CoolDev.Com is home of the best JavaScript drop down menu, JavaScript tree and outlook bar
JavaScript.CoolDev.Com is home of the best JavaScript drop down menu, JavaScript tree and outlook bar
JavaScript.CoolDev.Com is home of the best JavaScript drop down menu, JavaScript tree and outlook bar
COOLjsMenu Samples

Standard:

item sizing
item positioning
border & pseudo-shadow
multiple levels
styles & colors
multiple instances
tips and status bar
IE filters
IE transitions

Professional:

popups
cross-frame
relative positioning
icons
arrows
advanced borders
z-index

Graphically Rich:

Demo 1
Demo 2
Demo 3
Demo 4
Demo 5
Demo 6
Demo 7
Demo 8
Demo 9

COOLjsMenu - JavaScript menu: order now!

Rate It!

If you like COOLjsMenu
vote for it!

ScriptSearch.com

HotScripts.com

Advanced borders


COOLjsMenu Professional has some advanced border features: borders can be configured separately - left, right, top, and bottom. This can be done using styles. Here is the code describing node style with left and right borders:

var STYLE_LEFTRIGHT = { border:1, borders:[1,0,1,0], shadow:0, color:color, css:css};

"border" field denotes if there will be some border, and "borders" field defines widths in pixels for each side: left, top, right, bottom.

To define menu without separators, you need tree styled: for the first item, for the last item, and for the others:

var STYLE_V_FIRST = { border:1, borders:[1,1,1,0], shadow:0, color:color2, css:css };
var STYLE_V_MIDDLE = { border:1, borders:[1,0,1,0], shadow:0, color:color2, css:css };
var STYLE_V_LAST = { border:1, borders:[1,0,1,1], shadow:0, color:color2, css:css };

...

{code:"Vertical",
    sub:[
        {style:STYLE_V_MIDDLE},
        {code:"SubItem 1", format:{style:STYLE_V_FIRST}},
        {code:"SubItem 2"},
        {code:"SubItem 3"},
        {code:"SubItem 4", format:{style:STYLE_V_LAST}}
    ]
}

All items have default style STYLE_V_MIDDLE. First and last items explicity override this style with STYLE_V_FIRST and STYLE_V_LAST. These styles differ only in border declaration.