wijmo.knockout.input Class wjMenuItem Wijmo API Class

wjMenuItem Class

KnockoutJS binding for menu items.

Use the wjMenuItem binding to add menu items to a Menu control. The wjMenuItem binding must be contained in a wjMenu binding. For example:

<p>Here is a Menu control with four menu items:</p>
<div data-bind="wjMenu: { value: tax, header: 'Tax' }">
    <span data-bind="wjMenuItem: { value: 0 }">Exempt</span>
    <span data-bind="wjMenuItem: { value: .05 }">5%</span>
    <span data-bind="wjMenuItem: { value: .1 }">10%</span>
    <span data-bind="wjMenuItem: { value: .15 }">15%</span>

The wjMenuItem binding supports the following attributes:

Function to execute in the controller when the item is clicked.
Parameter passed to the cmd function when the item is clicked.
Value selected when the item is clicked (use either this or cmd).


  • WjBinding
    • wjMenuItem