|
Key
|
Description
|
Accepted Values
|
Default Value
|
|
|
|
Général
|
|
width
|
Horizontal size of an item in a sub-menu block, pixels.
|
A positive integer number
|
none
|
|
height
|
Vertical size of an item in a sub-menu block, pixels.
|
A positive integer number
|
none
|
|
top
|
Vertical offset between the items within level in pixels.
|
An integer number
|
none
|
|
left
|
Horizontal offset between the items within level in pixels.
|
An integer number
|
none
|
|
block_top
|
Horizontal offset of the upper left corner of a block relatively to the upper left corner of the parent item, in pixels.
If for root level (the one with index 0) is menu offset from the document's left upper corner, so use it for menu positioning on the page.
|
An integer number
|
none
|
|
block_left
|
Vertical offset of the upper left corner of a block relatively to the upper left corner of the parent item, in pixels.
If for root level (the one with index 0) is menu offset from the document's left upper corner, so use it for menu positioning on the page.
|
A integer number
|
none
|
|
Délais
|
|
expd_delay
|
A time delay between item mouseover corresponding sub-menu block expanding. The delay prevents from flashing sub-menus when the mouse crosses the menu. If negative value is provided then items are opened on click only.
|
A positive integer number or null
|
0
|
|
hide_delay
|
A time delay between moments of mouse pointer goes from above an item and of corresponding sub-menu block collapsing. Menu items may have some spacing between so the delay is applied before menu collapses after mouse pointer left the item. The bigger distances the more delay may be required.
Is not taken into account for root level (the one with index 0)
|
A positive integer number or null
|
0
|
|
Styles
|
|
css
|
An associative JavaScript array for defining item styles
|
|
Aucun style
|
|
|
outer
|
A style class(es) for an outer tag for each state of an item.
Can be defined as a scalar value or an array of 1 to 3 elements, note that values are inherited from left to right if value set is not complete.
If defined as a JavaScript array then contains style class names for each item's state: [mouseout, mouseover, mousedown];
If defined as a string then is style class name for all item's states
|
An array of any (maximum three) valid style class names
or
any valid style class name
|
No style(s)
|
|
inner
|
A style class(es) for an inner tag for each state of an item.
Can be defined as a scalar value or an array of 1 to 3 elements, note that values are inherited from left to right if value set is not complete.
If defined as a JavaScript array then contains style class names for each item's state: [mouseout, mouseover, mousedown];
If defined as a string then is style class name for all item's states
|
An array of any (maximum three) valid style class names
or
any valid style class name
|
No style(s)
|
|
menu_tpl1.js :
var MENU_POS1 = [
{'height': 24,
'width': 125,
'block_top': 185,
'block_left': 0,
'top': 0,
'left': 125,
'hide_delay': 200,
'expd_delay': 10,
'css' : {
'outer' : ['m0l0oout', 'm0l0oover' , 'menu0downo'],
'inner' : ['m0l0iout', 'm0l0iover' ,'m0l0odown']
}
},
{
'width': 190,
'block_top': 25,
'block_left': 0,
'top': 25,
'left': 0
},
{
'block_top': 0,
'block_left': 180
}
]
To set up the menu in the center of the screen add the following at the top of menu_tpl1.js
var winW = 630, winH = 460;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
if (winW < 780) { winW = 800 }
|