Parameters specifications for menus

Show me the menu demo

Menu example

Parameter list for menus

Paramters for Menus
Parameter Type Allowable Values Default Required
BootMenuOfs integer positive integer 125 false
ColumnCount integer positive integer 1 false
Data JSON object array, object or array of objects none true
Filters array of objects {‘str’:’str’} or {‘str’:’RegExp’} none false
MenuOptionsTypeM string ‘Select’ or ‘Navigate’ ‘Select’ false
ShowAt string ‘Bottom’ or ‘Right’ ‘Bottom’ false
ShowDownArrow string ‘None or <color>’ ‘black’ false
Sort array of strings [‘alpha’|’num’, ‘desc’|’asc’] [‘alpha’,’asc’] false
Width integer positive integer width of parent false
Window string ‘repl’or ‘new’ repl false

Parameters explained for menus

BootMenuOfs

options: positive integer

BootMenuOfs is useful to control where the menu appears when you have a Bootstrap navbar menu that has been expanded from a collapsed state. This allows control of how far from the left that the menu will appear
'BootMenuOfs': 150,

ColumnCount

options: positive integer

MenuOptions defaults to a single column. To show have more than one column, use the ColumnCount parameter.

Data

options: {}, or [ {}, {}, … ]

MenuOptions menus accept the following in Data

  1. a single multikey object
    { 1:”Jan”, 2:”Feb”,…}
  2. an array of single key objects
    single key [{1:”Jan”},{2:”Feb”}…]

Filters

options: [ { ‘text : ‘text’ }, …] or [ {‘text’: ‘RegExp’}, …]

Filters enable mouseover filering of menu items You can filter by plain text or by regular expression Here is an example of using Filters with a RegExp (Filters demo )

'Filters': [{ 'Biz' : '^(CNBC|MarketWatch)'}, {'Search' :'^(Google|Yahoo)'} ],

ShowAt

options: ‘bottom’ or ‘right’

MenuOptions accepts a string to tell it where to display the menu

"Bottom" means that the menu will appear underneath
"Right" means that the menu will appear to the right

ShowDownArrow

options: None or <color>

ShowDownArrow defaults to “black”, meaning a down arrow will automatically be appended to the end of a menu drop down in the color black. Set ShowDownArrow to “None” if you would rather not see this arrow. Set ShowDownArrow to “silver” if you would like the arrow color to be silver.

'ShowDownArrow': 'silver'

Sort

options: [‘alpha’ or ‘num’, ‘desc’ or ‘asc’]

Setting the property to an empty array will cause a Data array (or array of objects) to be displayed in the original order. With no sort, a single object will be displayed in random order.

Width

options: positive integer

MenuOptions will try to match the width of the parent element (it may be wider if the contents cannot fit). The Width parameter allows the user to override the default width.

Window

options: “repl” or “new”

When a menu itme is clicked, you can opt to have a new browser window open by using the “new” option. The default will be to replace the current URL with the one that was just clicked.

'Window': 'new'