AproJo

 view release on metacpan or  search on metacpan

share/files/public/skins/default/jquery-ui-1.9.1.custom/development-bundle/docs/menu.html  view on Meta::CPAN

<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>jQuery UI menu documentation</title>

	<style>
	body {
		font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"
	}
	.gutter {
		display: none;
	}
	</style>
</head>
<body>

<script>{
		"title":
			"Menu Widget",
		"excerpt":
			"\n\t\tThemeable menu with mouse and keyboard interactions for navigation.\n\t",
		"termSlugs": {
			"category": [
				"widgets"
			]
		}
	}</script><section class="quick-nav"><header><h2>QuickNav<a href="#entry-longdesc">Overview</a><a href="#entry-examples">Examples</a>
</h2></header><div class="quick-nav-section">
<h3>Options</h3>
<div><a href="#option-disabled">disabled</a></div>
<div><a href="#option-icons">icons</a></div>
<div><a href="#option-menus">menus</a></div>
<div><a href="#option-position">position</a></div>
<div><a href="#option-role">role</a></div>
</div>
<div class="quick-nav-section">
<h3>Methods</h3>
<div><a href="#method-blur">blur</a></div>
<div><a href="#method-collapse">collapse</a></div>
<div><a href="#method-collapseAll">collapseAll</a></div>
<div><a href="#method-destroy">destroy</a></div>
<div><a href="#method-disable">disable</a></div>
<div><a href="#method-enable">enable</a></div>
<div><a href="#method-expand">expand</a></div>
<div><a href="#method-focus">focus</a></div>
<div><a href="#method-isFirstItem">isFirstItem</a></div>
<div><a href="#method-isLastItem">isLastItem</a></div>
<div><a href="#method-next">next</a></div>
<div><a href="#method-nextPage">nextPage</a></div>
<div><a href="#method-option">option</a></div>
<div><a href="#method-previous">previous</a></div>
<div><a href="#method-previousPage">previousPage</a></div>
<div><a href="#method-refresh">refresh</a></div>
<div><a href="#method-select">select</a></div>
<div><a href="#method-widget">widget</a></div>
</div>
<div class="quick-nav-section">
<h3>Events</h3>
<div><a href="#event-blur">blur</a></div>
<div><a href="#event-create">create</a></div>
<div><a href="#event-focus">focus</a></div>
<div><a href="#event-select">select</a></div>
</div></section><article id="menu1" class="entry widget"><h2 class="section-title">
<span>Menu Widget</span><span class="version-details">version added: 1.9</span>
</h2>
<div class="entry-wrapper">
<p class="desc"><strong>Description: </strong>
		Themeable menu with mouse and keyboard interactions for navigation.
	</p>
<section id="options"><header><h2 class="underline">Options</h2></header><div id="option-disabled" class="api-item first-item">
<h3>disabled<span class="option-type"><strong>Type: </strong><a href="http://api.jquery.com/Types#Boolean">Boolean</a></span>
</h3>
<div class="default">
<strong>Default: </strong><code>false</code>
</div>
<div>Disables the menu if set to <code>true</code>.</div>
<strong>Code examples:</strong><p>Initialize the menu with the disabled option specified:</p>
<div class="syntaxhighlighter nogutter  "><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="plain">$( </code><code class="string">".selector"</code>...
<p>Get or set the disabled option, after initialization:</p>
<div class="syntaxhighlighter nogutter  "><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="comments">// getter</code></div><div class="line number2...
</div>
<div id="option-icons" class="api-item">
<h3>icons<span class="option-type"><strong>Type: </strong><a href="http://api.jquery.com/Types#Object">Object</a></span>
</h3>
<div class="default">
<strong>Default: </strong><code>{ submenu: "ui-icon-carat-1-e" }</code>
</div>
<div>
				Icons to use for submenus, matching an icon defined by the jQuery UI CSS Framework.
				<ul>
					<li>submenu (string, default: "ui-icon-carat-1-e")</li>
				</ul>
			</div>
</div>
<div id="option-menus" class="api-item">
<h3>menus<span class="option-type"><strong>Type: </strong><a href="http://api.jquery.com/Types#String">String</a></span>
</h3>
<div class="default">
<strong>Default: </strong><code>"ul"</code>
</div>
<div>Selector for the elements that serve as the menu container, including sub-menus.</div>
</div>
<div id="option-position" class="api-item">
<h3>position<span class="option-type"><strong>Type: </strong><a href="http://api.jquery.com/Types#Object">Object</a></span>
</h3>
<div class="default">
<strong>Default: </strong><code>{ my: "top left", at: "top right" }</code>
</div>
<div>Identifies the position of submenus in relation to the associated parent menu item. The <code>of</code> option defaults to the parent menu item, but you can specify another element to position against. You can refer to the <a href="/position/">j...
</div>
<div id="option-role" class="api-item">
<h3>role<span class="option-type"><strong>Type: </strong><a href="http://api.jquery.com/Types#String">String</a></span>
</h3>
<div class="default">
<strong>Default: </strong><code>"menu"</code>
</div>
<div>Customize the ARIA roles used for the menu and menu items. The default uses <code>"menuitem"</code> for items. Setting the <code>role</code> option to <code>"listbox"</code> will use <code>"option"</code> for items. If set to <code>null</code>, ...
</div></section><section id="methods"><header><h2 class="underline">Methods</h2></header><div id="method-blur"><div class="api-item first-item">
<h3>blur(  [event ] )</h3>
<div>
				Removes focus from a menu, resets any active element styles and triggers the menu's <a href="event-blur"><code>blur</code></a> event.
			</div>
<ul><li>
<div><strong>event</strong></div>

share/files/public/skins/default/jquery-ui-1.9.1.custom/development-bundle/docs/menu.html  view on Meta::CPAN

</div>
<div id="event-select" class="api-item">
<h3>select( event, ui )</h3>
<div>
				Triggered when a menu item is selected.
			</div>
<ul>
<li>
<div><strong>event</strong></div>
<div>Type: <a href="http://api.jquery.com/Types#Event">Event</a>
</div>
<div></div>
</li>
<li>
<div><strong>ui</strong></div>
<div>Type: <a href="http://api.jquery.com/Types#Object">Object</a>
</div>
<div></div>
<ul><li>
<div><strong>item</strong></div>
<div>Type: <a href="http://api.jquery.com/Types#jQuery">jQuery</a>
</div>
<div>
						The currently active menu item.
					</div>
</li></ul>
</li>
</ul>
</div></section><div class="longdesc" id="entry-longdesc">
		<p>A menu can be created from any valid markup as long as the elements have a strict parent/child relationship and each menu item has an anchor. The most commonly used element is the unordered list (<code>&lt;ul&gt;</code>):</p>

		<pre>
&lt;ul id="menu"&gt;
	&lt;li&gt;&lt;a href="#"&gt;Item 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Item 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Item 3&lt;/a&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;a href="#"&gt;Item 3-1&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="#"&gt;Item 3-2&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="#"&gt;Item 3-3&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="#"&gt;Item 3-4&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="#"&gt;Item 3-5&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Item 4&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Item 5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>

		<p>If you use a structure other than <code>&lt;ul&gt;</code>/<code>&lt;li&gt;</code>, including using the same element for the menu and the menu items, use the <a href="#option-menus"><code>menus</code></a> option to specify a way to differentiate ...

		<p>Any menu item can be disabled by adding the <code>ui-state-disabled</code> class to that element.</p>

		<p>To add icons to the menu, include them in the markup:</p>

		<pre>
&lt;ul id="menu"&gt;
	&lt;li&gt;&lt;a href="#"&gt;&lt;span class="ui-icon ui-icon-disk"&gt;&lt;/span&gt;Save&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
		<p>Menu automatically adds the necessary padding to items without icons.</p>

		<h3>Keyboard interaction</h3>

		<ul>
			<li>ENTER/SPACE: Invoke the focused menu item's action, which may be opening a submenu.</li>
			<li>UP: Move focus to the previous menu item.</li>
			<li>DOWN: Move focus to the next menu item.</li>
			<li>RIGHT: Open the submenu, if available.</li>
			<li>LEFT: Close the current submenu and move focus to the parent menu item. If not in a submenu, do nothing.</li>
			<li>ESCAPE: Close the current submenu and move focus to the parent menu item. If not in a submenu, do nothing.</li>
		</ul>

		<p>Typing a letter moves focus to the first item whose title starts with that character. Repeating the same character cycles through matching items. Typing more characters within the one second timer matches those characters.</p>

		<p>Disabled items can receive keyboard focus, but do not allow any other interaction.</p>
	</div>
<h3>Additional Notes:</h3>
<div class="longdesc"><ul><li>
			This widget requires some functional CSS, otherwise it won't work. If you build a custom theme, use the widget's specific CSS file as a starting point.
		</li></ul></div>
<section class="entry-examples" id="entry-examples"><header><h2 class="underline">Example:</h2></header><div class="entry-example" id="example-0">
<h4><span class="desc">A simple jQuery UI Menu</span></h4>
<div class="syntaxhighlighter  "><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><d...
<h4>Demo:</h4>
<div class="demo code-demo"></div>
</div></section>
</div></article>

</body>
</html>



( run in 1.309 second using v1.01-cache-2.11-cpan-f56aa216473 )