Menu Items Actions
With CodeThatMenu you can customize an action that will be performed after item click event. It may be:
execution of JS code;
jump to URL (you should select an url, link target and item hint);
JS code to execute when item is switched on/off (for boolean items only).
Whole menu item area is clickable.
Remember item's structure:
"items" : [ {
"text" : " ", // text to be written inside
"style" : { }, // item style in normal state
"styleover" : { }, // item style in "mouse over" state
"styleon" : { }, // for bool items specifies the style when in "on" state
"menu" : { }, // submenu
"action" : { },
"position" : { },
"type" : " " // special item type ("bool"/"separator"),
// for hierarchical menu only
} ]
|
To describe a click action use "action" property:
"action" : {
"js" : " " // JS code
"url" : " " // go to URL
"target" : " " // link target
"title" : " " // item hint
"on" : " " // JS code to evaluate when item is switched to on
"off" : " " // JS code to evaluate when item is switched to off
}
|
Example - Menu Items Actions
You can see an example and complete code here - Menu Items Actions Example
Read more about CodeThatMenu >>
|