# wjMenuItem Class

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								wjMenuItem Class
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>KnockoutJS binding for menu items.</p>
								</div>
								<p>Use the <a href="wijmo_knockout_input.wjmenuitem.html">wjMenuItem</a> binding to add menu items to a <a href="wijmo_input.menu.html">Menu</a> control.
									The <a href="wijmo_knockout_input.wjmenuitem.html">wjMenuItem</a> binding must be contained in a <a href="wijmo_knockout_input.wjmenu.html">wjMenu</a> binding.
								For example:</p>
								<pre>&lt;p&gt;Here is a Menu control with four menu items:&lt;/p&gt;
&lt;div data-bind="wjMenu: { value: tax, header: 'Tax' }"&gt;
    &lt;span data-bind="wjMenuItem: { value: 0 }"&gt;Exempt&lt;/span&gt;
    &lt;span data-bind="wjMenuItem: { value: .05 }"&gt;5%&lt;/span&gt;
    &lt;span data-bind="wjMenuItem: { value: .1 }"&gt;10%&lt;/span&gt;
    &lt;span data-bind="wjMenuItem: { value: .15 }"&gt;15%&lt;/span&gt;
&lt;/div&gt;</pre>
								<p>The <b>wjMenuItem</b> binding supports the following attributes:</p>
								<dl class="dl-horizontal">
									<dt>cmd</dt>       <dd>Function to execute in the controller when the item is clicked.</dd>
									<dt>cmdParam</dt>  <dd>Parameter passed to the <b>cmd</b> function when the item is clicked.</dd>
									<dt>value</dt>     <dd>Value selected when the item is clicked (use either this or <b>cmd</b>).</dd>
								</dl>
							</div>
						</section>
						<section class="tsd-hierarchy">
							<h3>Heirarchy</h3>
							<ul class="tsd-hierarchy">
								<li>
									<span class="tsd-signature-type">WjBinding</span>
									<ul class="tsd-hierarchy">
										<li>
											<span class="target">wjMenuItem</span>
										</li>
									</ul>
								</li>
							</ul>
						</section>
					</div>