|
525
|
1 |
<!DOCTYPE html> |
|
|
2 |
<html lang="en"> |
|
|
3 |
<head> |
|
|
4 |
<meta charset="utf-8"> |
|
|
5 |
<title>MenuNav Node Plugin</title> |
|
|
6 |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic"> |
|
|
7 |
<link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css"> |
|
|
8 |
<link rel="stylesheet" href="../assets/css/main.css"> |
|
|
9 |
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css"> |
|
|
10 |
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png"> |
|
|
11 |
<script src="../../build/yui/yui-min.js"></script> |
|
|
12 |
|
|
|
13 |
</head> |
|
|
14 |
<body> |
|
|
15 |
<!-- |
|
|
16 |
<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> |
|
|
17 |
--> |
|
|
18 |
<div id="doc"> |
|
|
19 |
<div id="hd"> |
|
|
20 |
<h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1> |
|
|
21 |
</div> |
|
|
22 |
|
|
|
23 |
<a href="#toc" class="jump">Jump to Table of Contents</a> |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
<h1>MenuNav Node Plugin</h1> |
|
|
27 |
<div class="yui3-g"> |
|
|
28 |
<div class="yui3-u-3-4"> |
|
|
29 |
<div id="main"> |
|
|
30 |
<div class="content"><div class="intro"> |
|
|
31 |
<p> |
|
|
32 |
The MenuNav Node Plugin makes it easy to transform existing list-based |
|
|
33 |
markup into traditional, drop down navigational menus that are both |
|
|
34 |
accessible and easy to customize, and only require a small set of |
|
|
35 |
dependencies. The MenuNav Node Plugin features: |
|
|
36 |
</p> |
|
|
37 |
|
|
|
38 |
<dl> |
|
|
39 |
<dt>Progressive Enhancement</dt> |
|
|
40 |
<dd> |
|
|
41 |
The MenuNav Node Plugin is designed to support |
|
|
42 |
<a href="http://en.wikipedia.org/wiki/Progressive_enhancement">Progressive Enhancement</a>, |
|
|
43 |
making it easy to transform simple, semantic markup into dynamic |
|
|
44 |
drop-down menus with just a few lines of JavaScript. |
|
|
45 |
</dd> |
|
|
46 |
|
|
|
47 |
<dt>Small footprint</dt> |
|
|
48 |
<dd> |
|
|
49 |
The MenuNav Node Plugin has a small footprint of ~5 KB (GZIP'd) and |
|
|
50 |
requires a minimal set of dependencies. |
|
|
51 |
</dd> |
|
|
52 |
|
|
|
53 |
<dt>Accessibility & Usability Minded</dt> |
|
|
54 |
<dd> |
|
|
55 |
The MenuNav Node Plugin was built with both accessibility and usability |
|
|
56 |
in mind. The MenuNav Node Plugin implements established mouse and |
|
|
57 |
keyboard interaction patterns to deliver a user experience that is both |
|
|
58 |
familiar and easy to use. To that foundation the MenuNav Node plugin |
|
|
59 |
adds support for screen readers through the use of the |
|
|
60 |
<a href="http://www.w3.org/TR/wai-aria/">WAI-ARIA Roles and States</a>. |
|
|
61 |
</dd> |
|
|
62 |
|
|
|
63 |
<dt>Easy to style and configure</dt> |
|
|
64 |
<dd> |
|
|
65 |
The MenuNav Node Plugin is easy to configure. The visual presentation |
|
|
66 |
of menus is controlled completely via CSS. A handful of |
|
|
67 |
straightforward <a href="#configuration-attributes">configuration attributes</a> can be used to make |
|
|
68 |
common modifications to a menu's behavior. |
|
|
69 |
</dd> |
|
|
70 |
|
|
|
71 |
<dt><code><iframe></code> Shim for IE 6</dt> |
|
|
72 |
<dd> |
|
|
73 |
No menuing system would be complete without an |
|
|
74 |
<code><iframe></code> to prevent <code><select></code> elements from poking through menus |
|
|
75 |
in IE 6. |
|
|
76 |
</dd> |
|
|
77 |
</dl> |
|
|
78 |
</div> |
|
|
79 |
|
|
|
80 |
<div class="notice"> |
|
|
81 |
<p> |
|
|
82 |
<strong>NOTICE</strong>: This component is <strong>deprecated</strong> |
|
|
83 |
as of YUI 3.9.0 and will be removed in future versions. |
|
|
84 |
</p> |
|
|
85 |
|
|
|
86 |
<p> |
|
|
87 |
If you require functionality similar to the one provided by this module, consider taking a look at the various modules in the <a href="http://yuilibrary.com/gallery/">YUI Gallery</a>. |
|
|
88 |
</p> |
|
|
89 |
</div> |
|
|
90 |
|
|
|
91 |
<h2 id="getting-started">Getting Started</h2> |
|
|
92 |
|
|
|
93 |
<p> |
|
|
94 |
To include the source files for MenuNav Node Plugin and its dependencies, first load |
|
|
95 |
the YUI seed file if you haven't already loaded it. |
|
|
96 |
</p> |
|
|
97 |
|
|
|
98 |
<pre class="code prettyprint"><script src="http://yui.yahooapis.com/3.10.3/build/yui/yui-min.js"></script></pre> |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
<p> |
|
|
102 |
Next, create a new YUI instance for your application and populate it with the |
|
|
103 |
modules you need by specifying them as arguments to the <code>YUI().use()</code> method. |
|
|
104 |
YUI will automatically load any dependencies required by the modules you |
|
|
105 |
specify. |
|
|
106 |
</p> |
|
|
107 |
|
|
|
108 |
<pre class="code prettyprint"><script> |
|
|
109 |
// Create a new YUI instance and populate it with the required modules. |
|
|
110 |
YUI().use('node-menunav', function (Y) { |
|
|
111 |
// MenuNav Node Plugin is available and ready for use. Add implementation |
|
|
112 |
// code here. |
|
|
113 |
}); |
|
|
114 |
</script></pre> |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
<p> |
|
|
118 |
For more information on creating YUI instances and on the |
|
|
119 |
<a href="http://yuilibrary.com/yui/docs/api/classes/YUI.html#method_use"><code>use()</code> method</a>, see the |
|
|
120 |
documentation for the <a href="../yui/index.html">YUI Global Object</a>. |
|
|
121 |
</p> |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
<p> |
|
|
125 |
<strong>Note:</strong> be sure to add the <code>yui3-skin-sam</code> classname to the |
|
|
126 |
page's <code><body></code> element or to a parent element of the widget in order to apply |
|
|
127 |
the default CSS skin. See <a href="http://yuilibrary.com/yui/docs/tutorials/skins/">Understanding Skinning</a>. |
|
|
128 |
</p> |
|
|
129 |
|
|
|
130 |
<pre class="code prettyprint"><body class="yui3-skin-sam"> <!-- You need this skin class --></pre> |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
<h3 id="setup">Basic Setup</h3> |
|
|
134 |
|
|
|
135 |
<p> |
|
|
136 |
To create a menu using the MenuNav Node Plugin, start by including the required markup. The markup |
|
|
137 |
for menus created using the MenuNav Node Plugin follows the same <a href="../widget/index.html#markup">pattern established for Widgets</a>, |
|
|
138 |
with each menu's content box containing one or more <code><ul></code> elements: |
|
|
139 |
</p> |
|
|
140 |
|
|
|
141 |
<h4 id="menu-markup-example">Menu Markup Example</h4> |
|
|
142 |
|
|
|
143 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu"><!-- Bounding box --> |
|
|
144 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
145 |
<ul> |
|
|
146 |
<!-- Menu items --> |
|
|
147 |
</ul> |
|
|
148 |
</div> |
|
|
149 |
</div></pre> |
|
|
150 |
|
|
|
151 |
|
|
|
152 |
<p> |
|
|
153 |
Menu items also follow the Widget markup pattern, with the root node defined using an |
|
|
154 |
<code><li></code> element: |
|
|
155 |
</p> |
|
|
156 |
|
|
|
157 |
<h4 id="menuitem-markup-example">MenuItem Markup Example</h4> |
|
|
158 |
|
|
|
159 |
<pre class="code prettyprint"><li class="yui3-menuitem"><!-- Bounding box --> |
|
|
160 |
<a class="yui3-menuitem-content" href="http://www.yahoo.com"><!-- Content box --> |
|
|
161 |
Yahoo! |
|
|
162 |
</a> |
|
|
163 |
</li></pre> |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
<p> |
|
|
167 |
Submenus are defined by wrapping the the menu markup in an <code><li></code> element. Each |
|
|
168 |
submenu must have have a label. The label should preceed the menu markup, and the label's |
|
|
169 |
<code>href</code> attribute should be set to the point to the id of its corresponding submenu. |
|
|
170 |
</p> |
|
|
171 |
|
|
|
172 |
<h4 id="submenu-markup-example">Submenu Markup Example</h4> |
|
|
173 |
|
|
|
174 |
<pre class="code prettyprint"><li> |
|
|
175 |
<a class="yui3-menu-label" href="#submenu-1">Submenu Label</a><!-- Menu label --> |
|
|
176 |
<div id="submenu-1" class="yui3-menu"><!-- Bounding box --> |
|
|
177 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
178 |
<ul> |
|
|
179 |
<!-- Menu items --> |
|
|
180 |
</ul> |
|
|
181 |
</div> |
|
|
182 |
</div> |
|
|
183 |
</li></pre> |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
<p> |
|
|
187 |
Following the patterns illustrated above, the markup for a menu created using the MenuNav Node |
|
|
188 |
Plugin comes together as follows: |
|
|
189 |
</p> |
|
|
190 |
|
|
|
191 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu"><!-- Root menu bounding box --> |
|
|
192 |
<div class="yui3-menu-content"><!-- Root menu content box --> |
|
|
193 |
<ul> |
|
|
194 |
<li class="yui3-menuitem"><!-- Menuitem bounding box --> |
|
|
195 |
<a class="yui3-menuitem-content" href="http://www.yahoo.com"><!-- Menuitem content box --> |
|
|
196 |
Yahoo! |
|
|
197 |
</a> |
|
|
198 |
</li> |
|
|
199 |
<li> |
|
|
200 |
<a class="yui3-menu-label" href="#pim">PIM</a><!-- Submenu label --> |
|
|
201 |
<div id="pim" class="yui3-menu"><!-- Submenu bounding box --> |
|
|
202 |
<div class="yui3-menu-content"><!-- Submenu content box --> |
|
|
203 |
<ul> |
|
|
204 |
<li class="yui3-menuitem"> |
|
|
205 |
<a class="yui3-menuitem-content" href="http://mail.yahoo.com">Yahoo! Mail</a> |
|
|
206 |
</li> |
|
|
207 |
<li class="yui3-menuitem"> |
|
|
208 |
<a class="yui3-menuitem-content" href="http://addressbook.yahoo.com">Yahoo! Address Book</a> |
|
|
209 |
</li> |
|
|
210 |
<li class="yui3-menuitem"> |
|
|
211 |
<a class="yui3-menuitem-content" href="http://calendar.yahoo.com">Yahoo! Calendar</a> |
|
|
212 |
</li> |
|
|
213 |
<li class="yui3-menuitem"> |
|
|
214 |
<a class="yui3-menuitem-content" href="http://notepad.yahoo.com">Yahoo! Notepad</a> |
|
|
215 |
</li> |
|
|
216 |
</ul> |
|
|
217 |
</div> |
|
|
218 |
</div> |
|
|
219 |
</li> |
|
|
220 |
</ul> |
|
|
221 |
</div> |
|
|
222 |
</div></pre> |
|
|
223 |
|
|
|
224 |
|
|
|
225 |
<p> |
|
|
226 |
With the markup for the menu in place, simply get a Node reference for the root menu and then call |
|
|
227 |
the <a href="http://yuilibrary.com/yui/docs/api/classes/Node.html#method_plug"><code>plug</code></a> method, passing in a reference to the MenuNav Node Plugin. |
|
|
228 |
</p> |
|
|
229 |
|
|
|
230 |
<pre class="code prettyprint">// Call the "use" method, passing in "node-menunav". This will load the |
|
|
231 |
// script and CSS for the MenuNav Node Plugin and all of the required |
|
|
232 |
// dependencies. |
|
|
233 |
|
|
|
234 |
YUI().use("node-menunav", function(Y) { |
|
|
235 |
|
|
|
236 |
// Use the "contentready" event to initialize the menu when the subtree of |
|
|
237 |
// element representing the root menu (<div id="menu-1">) is ready to |
|
|
238 |
// be scripted. |
|
|
239 |
|
|
|
240 |
Y.on("contentready", function () { |
|
|
241 |
|
|
|
242 |
// The scope of the callback will be a Node instance representing |
|
|
243 |
// the root menu (<div id="menu-1">). Therefore, since "this" |
|
|
244 |
// represents a Node instance, it is possible to just call "this.plug" |
|
|
245 |
// passing in a reference to the MenuNav Node Plugin. |
|
|
246 |
|
|
|
247 |
this.plug(Y.Plugin.NodeMenuNav); |
|
|
248 |
|
|
|
249 |
}, "#menu-1"); |
|
|
250 |
|
|
|
251 |
});</pre> |
|
|
252 |
|
|
|
253 |
|
|
|
254 |
<h2 id="using">Using the MenuNav Node Plugin</h2> |
|
|
255 |
|
|
|
256 |
<h3 id="orientation-style-behavior">Orientation, Style and Behavior</h3> |
|
|
257 |
|
|
|
258 |
<h4 id="configuring-orientation">Configuring Orientation</h4> |
|
|
259 |
|
|
|
260 |
<p> |
|
|
261 |
The root menu of menus built using the MenuNav Node Plugin can have a verical or horizontal |
|
|
262 |
orientation. The default orientation for menus is vertical, but can be easily switched to |
|
|
263 |
horizontal by applying a class of <code>yui3-menu-horizontal</code> to the node representing the |
|
|
264 |
root menu's bounding box, as illustrated in the following example: |
|
|
265 |
</p> |
|
|
266 |
|
|
|
267 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu yui3-menu-horizontal"><!-- Bounding box --> |
|
|
268 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
269 |
<ul> |
|
|
270 |
<!-- Menu items --> |
|
|
271 |
</ul> |
|
|
272 |
</div> |
|
|
273 |
</div></pre> |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
<p> |
|
|
277 |
Once the <code>yui3-menu-horizontal</code> class name is applied to the node representing the |
|
|
278 |
root menu's bounding box, the menu's keyboard interaction is automatically adjusted for a |
|
|
279 |
horizontal orientation. The default "Sam" skin provides the following default visualization for |
|
|
280 |
horizontal menus, as illustrated in the follow screen capture of a horizontal menu example: |
|
|
281 |
</p> |
|
|
282 |
|
|
|
283 |
<div class="wideimage"><img src="../assets/node-menunav/horizontal-menu.png" width="495" height="130" alt="Screenshot of a horizontal menu rendered with the default Sam Skin"></div> |
|
|
284 |
|
|
|
285 |
<h4 id="configuring-style-behavior">Configuring Style & Behavior</h4> |
|
|
286 |
|
|
|
287 |
<p> |
|
|
288 |
The default "Sam" skin provides two additional visualizations for horizontal menus, each of which |
|
|
289 |
can be applied by both changes to the menu label markup and through the application of a class to |
|
|
290 |
the node representing the root menu's bounding box. |
|
|
291 |
</p> |
|
|
292 |
|
|
|
293 |
<h5 id="menu-button-visualization">Menu Button Visualization</h5> |
|
|
294 |
|
|
|
295 |
<p> |
|
|
296 |
The first of the two optional horizontal menu visualizations available with the "Sam" skin renders |
|
|
297 |
each menu label as a menu button; each menu label is rendered with an arrow to the right |
|
|
298 |
of its text label, providing a visual cue that there is a corresponding submenu. |
|
|
299 |
</p> |
|
|
300 |
|
|
|
301 |
<div class="wideimage"><img src="../assets/node-menunav/menubutton-menu.png" width="495" height="130" alt="Screen capture of a horizontal menu with each menu label in the root menu rendered as menu buttons."></div> |
|
|
302 |
|
|
|
303 |
<p> |
|
|
304 |
To apply this style to a horizontal menu, start by adding the class <code>yui3-menubuttonnav</code> |
|
|
305 |
to the node representing the root menu's bounding box, as illustrated in the following example: |
|
|
306 |
</p> |
|
|
307 |
|
|
|
308 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu yui3-menu-horizontal yui3-menubuttonnav"><!-- Bounding box --> |
|
|
309 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
310 |
<ul> |
|
|
311 |
<!-- Menu items --> |
|
|
312 |
</ul> |
|
|
313 |
</div> |
|
|
314 |
</div></pre> |
|
|
315 |
|
|
|
316 |
|
|
|
317 |
<p>Next, wrap the text node of each menu label in an <code><em></code> element:</p> |
|
|
318 |
|
|
|
319 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu yui3-menu-horizontal yui3-menubuttonnav"><!-- Bounding box --> |
|
|
320 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
321 |
<ul> |
|
|
322 |
|
|
|
323 |
<li> |
|
|
324 |
<a class="yui3-menu-label" href="#submenu-1"><em>Submenu Label</em></a> |
|
|
325 |
<div id="submenu-1" class="yui3-menu"> |
|
|
326 |
<div class="yui3-menu-content"> |
|
|
327 |
|
|
|
328 |
<!-- submenu content --> |
|
|
329 |
|
|
|
330 |
</div> |
|
|
331 |
</div> |
|
|
332 |
</li> |
|
|
333 |
|
|
|
334 |
</ul> |
|
|
335 |
</div> |
|
|
336 |
</div></pre> |
|
|
337 |
|
|
|
338 |
|
|
|
339 |
<p> |
|
|
340 |
As a final, optional step, use the |
|
|
341 |
<a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#attr_autoSubmenuDisplay"><code>autoSubmenuDisplay</code></a> |
|
|
342 |
and <a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#attr_mouseOutHideDelay"><code>mouseOutHideDelay</code></a> |
|
|
343 |
configuration attributes to configure the menu labels to behave like menu buttons. Set the |
|
|
344 |
<code>autoSubmenuDisplay</code> to <code>false</code>, so that each menu label's submenu isn't |
|
|
345 |
made visible until the label is clicked. Set the <code>mouseOutHideDelay</code> to |
|
|
346 |
<code>0</code> so that a label's submenu is only hidden when the user mouses down on an area |
|
|
347 |
outside of the submenu. |
|
|
348 |
</p> |
|
|
349 |
|
|
|
350 |
<pre class="code prettyprint">// Call the "use" method, passing in "node-menunav". This will load the |
|
|
351 |
// script and CSS for the MenuNav Node Plugin and all of the required |
|
|
352 |
// dependencies. |
|
|
353 |
|
|
|
354 |
YUI().use("node-menunav", function(Y) { |
|
|
355 |
|
|
|
356 |
// Use the "contentready" event to initialize the menu when the subtree of |
|
|
357 |
// element representing the root menu (<div id="menu-1">) is ready to |
|
|
358 |
// be scripted. |
|
|
359 |
|
|
|
360 |
Y.on("contentready", function () { |
|
|
361 |
|
|
|
362 |
// The scope of the callback will be a Node instance representing |
|
|
363 |
// the root menu (<div id="menu-1">). Therefore, since "this" |
|
|
364 |
// represents a Node instance, it is possible to just call "this.plug" |
|
|
365 |
// passing in a reference to the MenuNav Node Plugin. |
|
|
366 |
|
|
|
367 |
this.plug(Y.Plugin.NodeMenuNav, { autoSubmenuDisplay: false, mouseOutHideDelay: 0 }); |
|
|
368 |
|
|
|
369 |
}, "#menu-1"); |
|
|
370 |
|
|
|
371 |
});</pre> |
|
|
372 |
|
|
|
373 |
|
|
|
374 |
<h5 id="split-button-visualization">Split Button Visualization</h5> |
|
|
375 |
|
|
|
376 |
<p> |
|
|
377 |
The other optional horizontal menu visualization available with the "Sam" skin renders each menu |
|
|
378 |
label as a split button. |
|
|
379 |
</p> |
|
|
380 |
|
|
|
381 |
<div class="wideimage"><img src="../assets/node-menunav/splitbutton-menu.png" width="495" height="130" alt="Screen capture of a horizontal menu with each menu label in the root menu rendered as split buttons."></div> |
|
|
382 |
|
|
|
383 |
<p>To apply this style to a horizontal menu, start by adding the class |
|
|
384 |
<code>yui3-splitbuttonnav</code> to the node representing the root menu's bounding box, as |
|
|
385 |
illustrated in the following example: |
|
|
386 |
</p> |
|
|
387 |
|
|
|
388 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu yui3-menu-horizontal yui3-splitbuttonnav"><!-- Bounding box --> |
|
|
389 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
390 |
<ul> |
|
|
391 |
<!-- Menu items --> |
|
|
392 |
</ul> |
|
|
393 |
</div> |
|
|
394 |
</div></pre> |
|
|
395 |
|
|
|
396 |
|
|
|
397 |
<p> |
|
|
398 |
Next, define the markup for each menu label. Start with a <code><span></code> with a class |
|
|
399 |
of <code>yui3-menu-label</code> applied. Inside the <code><span></code>, place two |
|
|
400 |
<code><a></code> elements — one for each of the label's two clickable regions. |
|
|
401 |
Each <code><a></code> has separate, but related responsibilities: The first |
|
|
402 |
<code><a></code> represents the label's default action. The second <code><a></code> |
|
|
403 |
toggles the display of a submenu whose content contains other options related to, or in the same |
|
|
404 |
category as the default action. Therefore to configure the first <code><a></code>, |
|
|
405 |
simply set its <code>href</code> attribute to any URL. For the second <code><a></code>, |
|
|
406 |
apply a class name of <code>yui3-menu-toggle</code>, and set the value of the <code>href</code> |
|
|
407 |
attribute to the id of the label's corresponding submenu. Lastly, the text node of the second |
|
|
408 |
<code><a></code> should label the contents of its corresponding submenu. |
|
|
409 |
</p> |
|
|
410 |
|
|
|
411 |
<pre class="code prettyprint"><div id="menu-1" class="yui3-menu yui3-menu-horizontal yui3-splitbuttonnav"><!-- Bounding box --> |
|
|
412 |
<div class="yui3-menu-content"><!-- Content box --> |
|
|
413 |
<ul> |
|
|
414 |
<li> |
|
|
415 |
|
|
|
416 |
<span class="yui3-menu-label"><!-- menu label root node --> |
|
|
417 |
<a href="http://answers.yahoo.com">Answers</a><!-- menu label default action --> |
|
|
418 |
<a href="#answers-options" class="yui3-menu-toggle">Answers Options</a><!-- menu label submenu toggle --> |
|
|
419 |
</span> |
|
|
420 |
|
|
|
421 |
<div id="answers-options" class="yui3-menu"> |
|
|
422 |
<div class="yui3-menu-content"> |
|
|
423 |
<ul> |
|
|
424 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://answers.yahoo.com/dir/">Answer</a></li> |
|
|
425 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://answersonthestreet.yahoo.com/">Answers on the Street</a></li> |
|
|
426 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://answers.yahoo.com/question/;_ylt=Av3Nt22Mr7YNs651NWFv8YUPzKIX;_ylv=3?link=ask">Ask</a></li> |
|
|
427 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://answers.yahoo.com/dir/;_ylt=Aqp_jJlsYDP7urcq2WGC6HBJxQt.;_ylv=3?link=over&amp;amp;more=y">Discover</a></li> |
|
|
428 |
</ul> |
|
|
429 |
</div> |
|
|
430 |
</div> |
|
|
431 |
|
|
|
432 |
</li> |
|
|
433 |
</ul> |
|
|
434 |
</div> |
|
|
435 |
</div></pre> |
|
|
436 |
|
|
|
437 |
|
|
|
438 |
<p> |
|
|
439 |
Use the <a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#attr_autoSubmenuDisplay"><code>autoSubmenuDisplay</code></a> |
|
|
440 |
and <a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#attr_mouseOutHideDelay"><code>mouseOutHideDelay</code></a> |
|
|
441 |
configuration attributes to configure the menu labels to behave like split buttons. Set the |
|
|
442 |
<code>autoSubmenuDisplay</code> to <code>false</code>, so that each menu label's submenu isn't |
|
|
443 |
made visible until the menu trigger is clicked. Set the <code>mouseOutHideDelay</code> to |
|
|
444 |
<code>0</code> so that a label's submenu is only hidden when the user mouses down on an area |
|
|
445 |
outside of the submenu. |
|
|
446 |
</p> |
|
|
447 |
|
|
|
448 |
<pre class="code prettyprint">// Call the "use" method, passing in "node-menunav". This will load the |
|
|
449 |
// script and CSS for the MenuNav Node Plugin and all of the required |
|
|
450 |
// dependencies. |
|
|
451 |
|
|
|
452 |
YUI().use("node-menunav", function(Y) { |
|
|
453 |
|
|
|
454 |
// Use the "contentready" event to initialize the menu when the subtree of |
|
|
455 |
// element representing the root menu (<div id="menu-1">) is ready to |
|
|
456 |
// be scripted. |
|
|
457 |
|
|
|
458 |
Y.on("contentready", function () { |
|
|
459 |
|
|
|
460 |
// The scope of the callback will be a Node instance representing |
|
|
461 |
// the root menu (<div id="menu-1">). Therefore, since "this" |
|
|
462 |
// represents a Node instance, it is possible to just call "this.plug" |
|
|
463 |
// passing in a reference to the MenuNav Node Plugin. |
|
|
464 |
|
|
|
465 |
this.plug(Y.Plugin.NodeMenuNav, { autoSubmenuDisplay: false, mouseOutHideDelay: 0 }); |
|
|
466 |
|
|
|
467 |
}, "#menu-1"); |
|
|
468 |
|
|
|
469 |
});</pre> |
|
|
470 |
|
|
|
471 |
|
|
|
472 |
<h5 id="menuitem-separators">MenuItem Separators</h5> |
|
|
473 |
|
|
|
474 |
<p> |
|
|
475 |
The MenuNav Node Plugin makes it easy to create separators between items in a menu. |
|
|
476 |
To separate items in a menu, simply place items in their own |
|
|
477 |
<code><ul></code> elements inside their parent menu's content box, and |
|
|
478 |
apply a class name of <code>first-of-type</code> to the first |
|
|
479 |
<code><ul></code>. The following code will render separators between |
|
|
480 |
the "Zimbra" and "Address Book" items, and the "Notepad" and "Messenger" items. |
|
|
481 |
</p> |
|
|
482 |
|
|
|
483 |
<pre class="code prettyprint"><div id="pim" class="yui3-menu"> |
|
|
484 |
<div class="yui3-menu-content"> |
|
|
485 |
|
|
|
486 |
<ul class="first-of-type"> |
|
|
487 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://mail.yahoo.com">Mail</a></li> |
|
|
488 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://www.zimbra.com">Zimbra</a></li> |
|
|
489 |
</ul> |
|
|
490 |
|
|
|
491 |
<ul> |
|
|
492 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://addressbook.yahoo.com">Address Book</a></li> |
|
|
493 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://calendar.yahoo.com">Calendar</a></li> |
|
|
494 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://notepad.yahoo.com">Notepad</a></li> |
|
|
495 |
</ul> |
|
|
496 |
|
|
|
497 |
<ul> |
|
|
498 |
<li class="yui3-menuitem"><a class="yui3-menuitem-content" href="http://messenger.yahoo.com">Messenger</a></li> |
|
|
499 |
</ul> |
|
|
500 |
|
|
|
501 |
</div> |
|
|
502 |
</div></pre> |
|
|
503 |
|
|
|
504 |
|
|
|
505 |
<p> |
|
|
506 |
With the separator markup in place, the default "Sam" skin will render a top border between each |
|
|
507 |
<code><ul></code> element, as illustrated in the following screen capture of one of the |
|
|
508 |
MenuNav Node Plugin examples: |
|
|
509 |
</p> |
|
|
510 |
|
|
|
511 |
<div class="wideimage"><img src="../assets/node-menunav/menuitem-separators.png" width="495" height="250" alt="Screen capture of a horizontal menu"></div> |
|
|
512 |
|
|
|
513 |
<h3 id="styling-state">Styling State</h3> |
|
|
514 |
|
|
|
515 |
<p> |
|
|
516 |
The MenuNav Node Plugin manages the state of a menu's descendants through the application and |
|
|
517 |
removal of class names. Class names representing state are constructed using the descendent's |
|
|
518 |
name followed by a suffix representing the state. For example, hidden submenus have a class of |
|
|
519 |
<code>yui3-menu-hidden</code>. Class names used to represent state are always applied to the |
|
|
520 |
descendant's root node. See the <a href="#css-reference">CSS reference</a> for the complete list of state class |
|
|
521 |
names. |
|
|
522 |
</p> |
|
|
523 |
|
|
|
524 |
<h4 id="active-vs-inactive">Active vs. Inactive</h4> |
|
|
525 |
|
|
|
526 |
<p> |
|
|
527 |
Menuitems and menu labels have a default (inactive) state and an active state. Menuitems and |
|
|
528 |
menu labels are considered active when the user is interacting with them via the keyboard or the |
|
|
529 |
mouse. The active class name applied to menuitems and menu labels has two benefits: It provides |
|
|
530 |
a single entry point for styling state that would otherwise require the use of multiple CSS |
|
|
531 |
pseudo classes (<code>:hover</code> and <code>:focus</code>). The second benefit to the use of |
|
|
532 |
the active class name is that it provides consistent styling of state across all types of elements in |
|
|
533 |
all <a href="http://yuilibrary.com/yui/docs/tutorials/gbs/">supported browsers</a>. |
|
|
534 |
(IE 6 only supports the <code>:hover</code> and <code>:focus</code> pseudo classes on |
|
|
535 |
<code><a></code> elements. And while IE 7 supports <code>:hover</code> on all elements, it |
|
|
536 |
only supports <code>:focus</code> pseudo class on <code><a></code> elements.) |
|
|
537 |
</p> |
|
|
538 |
|
|
|
539 |
<h4 id="visible-vs-hidden">Visible vs. Hidden</h4> |
|
|
540 |
|
|
|
541 |
<p> |
|
|
542 |
By default all submenus are hidden and that state is reflected by the application of the |
|
|
543 |
<code>yui3-menu-hidden</code> class name. If the <code>yui3-menu-hidden</code> class name is not |
|
|
544 |
applied to the bounding box node of all submenus, it will automatically be applied by the MenuNav's |
|
|
545 |
constructor. When a submenu is visible, the <code>yui3-menu-hidden</code> class name is removed |
|
|
546 |
and a class <code>yui3-menu-label-menuvisible</code> is applied to the submenu's corresponding label. |
|
|
547 |
</p> |
|
|
548 |
|
|
|
549 |
<h3 id="configuration-attributes">Configuration Attributes</h3> |
|
|
550 |
|
|
|
551 |
<p> |
|
|
552 |
The MenuNav Node Plugin has several configuration attributes that can be set via an object literal |
|
|
553 |
that is passed as a second argument to a Node instance's |
|
|
554 |
<a href="http://yuilibrary.com/yui/docs/api/classes/Node.html#method_plug"><code>plug</code></a> method. (<em>Note:</em> These |
|
|
555 |
attributes are <em>case sensitive</em>.) In the following example, the value of the |
|
|
556 |
<code>mouseOutHideDelay</code> attribute is set to 1000. |
|
|
557 |
</p> |
|
|
558 |
|
|
|
559 |
<pre class="code prettyprint">var oMenuNav = Y.one("#productsandservices"); |
|
|
560 |
oMenuNav.plug(Y.Plugin.NodeMenuNav, { mouseOutHideDelay: 1000 });</pre> |
|
|
561 |
|
|
|
562 |
|
|
|
563 |
<p>The complete list of the MenuNav Node Plugin configuration attributes are:</p> |
|
|
564 |
|
|
|
565 |
<table> |
|
|
566 |
<thead> |
|
|
567 |
<tr> |
|
|
568 |
<th>Name</th> |
|
|
569 |
<th>Default Value</th> |
|
|
570 |
<th>Description</th> |
|
|
571 |
</tr> |
|
|
572 |
</thead> |
|
|
573 |
<tbody> |
|
|
574 |
<tr id="usearia"> |
|
|
575 |
<td>useARIA</td> |
|
|
576 |
<td>True</td> |
|
|
577 |
<td>Boolean indicating if use of the WAI-ARIA Roles and States should be enabled for the MenuNav. Set to true by default for Firefox 3 and Internet Explorer 8 as currently only these browsers have support for ARIA, and are supported by several screen readers for Windows that also offer support for ARIA.</td> |
|
|
578 |
</tr> |
|
|
579 |
<tr id="autosubmenudisplay"> |
|
|
580 |
<td>autoSubmenuDisplay</td> |
|
|
581 |
<td>True</td> |
|
|
582 |
<td>Boolean indicating if submenus are automatically made visible when the user mouses over the menu's items.</td> |
|
|
583 |
</tr> |
|
|
584 |
<tr id="submenushowdelay"> |
|
|
585 |
<td>submenuShowDelay</td> |
|
|
586 |
<td>250</td> |
|
|
587 |
<td>Number indicating the time (in milliseconds) that should expire before a submenu is made visible when the user mouses over the menu's label. </td> |
|
|
588 |
</tr> |
|
|
589 |
<tr id="submenuhidedelay"> |
|
|
590 |
<td>submenuHideDelay</td> |
|
|
591 |
<td>250</td> |
|
|
592 |
<td>Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of a menu label heading in the direction of a submenu.</td> |
|
|
593 |
</tr> |
|
|
594 |
<tr id="mouseouthidedelay"> |
|
|
595 |
<td>mouseOutHideDelay</td> |
|
|
596 |
<td>750</td> |
|
|
597 |
<td>Number indicating the time (in milliseconds) that should expire before a submenu is hidden when the user mouses out of it.</td> |
|
|
598 |
</tr> |
|
|
599 |
</tbody> |
|
|
600 |
</table> |
|
|
601 |
|
|
|
602 |
<h3 id="handling-events">Handling Events</h3> |
|
|
603 |
|
|
|
604 |
<p> |
|
|
605 |
The MenuNav Node Plugin publishes no custom events of its own. To listen for any DOM-related |
|
|
606 |
events for a menu built using the MenuNav Node Plugin, use the <a href="http://yuilibrary.com/yui/docs/api/classes/Node.html#method_on"><code>on</code></a> method of the |
|
|
607 |
plugin's host Node instance. The following example illustrates how to listen for the |
|
|
608 |
<code>click</code> event of menu a built using the MenuNav Node Plugin: |
|
|
609 |
</p> |
|
|
610 |
|
|
|
611 |
<pre class="code prettyprint">// Get a Node instance for HTML element |
|
|
612 |
var oMenuNode = Y.one("#menu-nav-1"); |
|
|
613 |
|
|
|
614 |
// Apply the MenuNav Node Plugin to the Node instance |
|
|
615 |
oMenuNode.plug(Y.Plugin.NodeMenuNav); |
|
|
616 |
|
|
|
617 |
// Register a "click" event listener to the Node instance using the "on" method |
|
|
618 |
oMenuNode.on("click", function () { |
|
|
619 |
|
|
|
620 |
alert("here"); |
|
|
621 |
|
|
|
622 |
});</pre> |
|
|
623 |
|
|
|
624 |
|
|
|
625 |
<p>For additional information on listening for DOM-related events, see the |
|
|
626 |
<a href="../node/index.html#node-events">DOM Events</a> section of the |
|
|
627 |
<a href="../node/index.html">Node landing page</a>. |
|
|
628 |
</p> |
|
|
629 |
|
|
|
630 |
<h3 id="iframe-shim"><code><iframe></code> Shim</h3> |
|
|
631 |
|
|
|
632 |
<p> |
|
|
633 |
The MenuNav Node Plugin uses an <code><iframe></code> shim to prevent |
|
|
634 |
<code><select></code> elements from poking through submenus in IE 6. The |
|
|
635 |
<code><iframe></code> shim is only used for IE 6, and for performance its creation is |
|
|
636 |
deferred until the first time a submenu is made visible. |
|
|
637 |
</p> |
|
|
638 |
|
|
|
639 |
<p> |
|
|
640 |
Once created, the |
|
|
641 |
<code><iframe></code> shim is appended to the node representing a submenu's bounding box, |
|
|
642 |
and is therefore a sibling of the the a submenu's content box. All styling of the |
|
|
643 |
<code><iframe></code> is handled by the core CSS file for the MenuNav Node Plugin, so |
|
|
644 |
authors of custom skins won't have to worry about it. The markup template used to create each |
|
|
645 |
<code><iframe></code> is accessible via the |
|
|
646 |
<a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#property_NodeMenuNav.SHIM_TEMPLATE"><code>SHIM_TEMPLATE</code></a> property. |
|
|
647 |
</p> |
|
|
648 |
|
|
|
649 |
<p> |
|
|
650 |
To help users of screen readers to avoid mistakenly interacting with the |
|
|
651 |
<code><iframe></code> shim, its <code>tabindex</code> attribute is set to "-1" and its |
|
|
652 |
title attribute is set to "Menu Stacking Shim". The value of the <code><iframe></code>'s |
|
|
653 |
<code>title</code> attribute is available via the |
|
|
654 |
<a href="http://yuilibrary.com/yui/docs/api/classes/plugin.NodeMenuNav.html#property_NodeMenuNav.SHIM_TEMPLATE_TITLE"><code>SHIM_TEMPLATE_TITLE</code></a> |
|
|
655 |
property for easy localization. Lastly, the <code>src</code> attribute of the |
|
|
656 |
<code><iframe></code> is set to "javascript:false;" so that it won't load a |
|
|
657 |
page inside it, preventing the secure/nonsecure warning in IE when using the MenuNav Node Plugin |
|
|
658 |
with HTTPS. |
|
|
659 |
</p> |
|
|
660 |
|
|
|
661 |
<h2 id="css-reference">CSS reference</h2> |
|
|
662 |
|
|
|
663 |
<table> |
|
|
664 |
<thead> |
|
|
665 |
<tr> |
|
|
666 |
<th>Class Name</th> |
|
|
667 |
<th>Description</th> |
|
|
668 |
</tr> |
|
|
669 |
</thead> |
|
|
670 |
<tbody> |
|
|
671 |
<tr> |
|
|
672 |
<td>yui3-menu</td> |
|
|
673 |
<td>Applied to the element representing a menu's bounding box.</td> |
|
|
674 |
</tr> |
|
|
675 |
<tr> |
|
|
676 |
<td>yui3-menu-content</td> |
|
|
677 |
<td>Applied to the element representing a menu's content box.</td> |
|
|
678 |
</tr> |
|
|
679 |
<tr> |
|
|
680 |
<td>yui3-menu-hidden</td> |
|
|
681 |
<td>Applied to a menu's bounding box when hidden.</td> |
|
|
682 |
</tr> |
|
|
683 |
<tr> |
|
|
684 |
<td>yui3-shim</td> |
|
|
685 |
<td>Applied to the element serving as a menu's shim.</td> |
|
|
686 |
</tr> |
|
|
687 |
<tr> |
|
|
688 |
<td>yui3-menu-horizontal</td> |
|
|
689 |
<td>Renders a menu horizontally. Applied to a menu's bounding box element.</td> |
|
|
690 |
</tr> |
|
|
691 |
<tr> |
|
|
692 |
<td>yui3-menu-label</td> |
|
|
693 |
<td>Applied to the element representing a menu's label.</td> |
|
|
694 |
</tr> |
|
|
695 |
<tr> |
|
|
696 |
<td>yui3-menu-label-active</td> |
|
|
697 |
<td>Applied to a menu's label when it is a MenuNav's active descendent.</td> |
|
|
698 |
</tr> |
|
|
699 |
<tr> |
|
|
700 |
<td>yui3-menu-label-menuvisible</td> |
|
|
701 |
<td>Applied to a menu's label when its corresponding menu is visible.</td> |
|
|
702 |
</tr> |
|
|
703 |
<tr> |
|
|
704 |
<td>yui3-menuitem</td> |
|
|
705 |
<td>Applied to the element representing a menuitem's bounding box.</td> |
|
|
706 |
</tr> |
|
|
707 |
<tr> |
|
|
708 |
<td>yui3-menuitem-content</td> |
|
|
709 |
<td>Applied to the element representing a menuitem's content box.</td> |
|
|
710 |
</tr> |
|
|
711 |
<tr> |
|
|
712 |
<td>yui3-menuitem-active</td> |
|
|
713 |
<td>Applied to a menuitem when it is a MenuNav's active descendent.</td> |
|
|
714 |
</tr> |
|
|
715 |
<tr> |
|
|
716 |
<td>first-of-type</td> |
|
|
717 |
<td> |
|
|
718 |
Applied to the first <code><ul></code> element inside each menu's |
|
|
719 |
content box. |
|
|
720 |
</td> |
|
|
721 |
</tr> |
|
|
722 |
</tbody> |
|
|
723 |
</table> |
|
|
724 |
|
|
|
725 |
<h2 id="known-issues">Known Issues</h2> |
|
|
726 |
|
|
|
727 |
<ul> |
|
|
728 |
<li><strong>Open <code><select></code>-based menus poke through submenus of a menu |
|
|
729 |
created using the MenuNav Node Plugin</strong> |
|
|
730 |
|
|
|
731 |
<p> |
|
|
732 |
<img src="../assets/node-menunav/select-issue.png" style="width:370px; height:257px; float:right;" alt="Screen capture of an open HTML select-based menu poking through the submenu of a menu created using the MenuNav Node Plugin"> |
|
|
733 |
In Safari 3 and IE 6 the <code><select></code> element's |
|
|
734 |
popup menu is modal—making it impossible to interact with any |
|
|
735 |
of the other elements on the page, and therefore impossible to both |
|
|
736 |
trigger the display of a DHTML menu and impossible for the |
|
|
737 |
<code><select></code> element's popup menu to potentially |
|
|
738 |
poke through a DHTML menu. |
|
|
739 |
</p> |
|
|
740 |
<p> |
|
|
741 |
In all other browsers, a <code><select></code> element's |
|
|
742 |
popup menu is both <em>not</em> modal and has a zindex higher than |
|
|
743 |
any other element. The established best practice of using an |
|
|
744 |
<code><iframe></code> element has a shim does not fix the |
|
|
745 |
problem. Currently there is no fix for this issue. |
|
|
746 |
</p> |
|
|
747 |
</li> |
|
|
748 |
</ul> |
|
|
749 |
</div> |
|
|
750 |
</div> |
|
|
751 |
</div> |
|
|
752 |
|
|
|
753 |
<div class="yui3-u-1-4"> |
|
|
754 |
<div class="sidebar"> |
|
|
755 |
|
|
|
756 |
<div id="toc" class="sidebox"> |
|
|
757 |
<div class="hd"> |
|
|
758 |
<h2 class="no-toc">Table of Contents</h2> |
|
|
759 |
</div> |
|
|
760 |
|
|
|
761 |
<div class="bd"> |
|
|
762 |
<ul class="toc"> |
|
|
763 |
<li> |
|
|
764 |
<a href="#getting-started">Getting Started</a> |
|
|
765 |
<ul class="toc"> |
|
|
766 |
<li> |
|
|
767 |
<a href="#setup">Basic Setup</a> |
|
|
768 |
<ul class="toc"> |
|
|
769 |
<li> |
|
|
770 |
<a href="#menu-markup-example">Menu Markup Example</a> |
|
|
771 |
</li> |
|
|
772 |
<li> |
|
|
773 |
<a href="#menuitem-markup-example">MenuItem Markup Example</a> |
|
|
774 |
</li> |
|
|
775 |
<li> |
|
|
776 |
<a href="#submenu-markup-example">Submenu Markup Example</a> |
|
|
777 |
</li> |
|
|
778 |
</ul> |
|
|
779 |
</li> |
|
|
780 |
</ul> |
|
|
781 |
</li> |
|
|
782 |
<li> |
|
|
783 |
<a href="#using">Using the MenuNav Node Plugin</a> |
|
|
784 |
<ul class="toc"> |
|
|
785 |
<li> |
|
|
786 |
<a href="#orientation-style-behavior">Orientation, Style and Behavior</a> |
|
|
787 |
<ul class="toc"> |
|
|
788 |
<li> |
|
|
789 |
<a href="#configuring-orientation">Configuring Orientation</a> |
|
|
790 |
</li> |
|
|
791 |
<li> |
|
|
792 |
<a href="#configuring-style-behavior">Configuring Style & Behavior</a> |
|
|
793 |
<ul class="toc"> |
|
|
794 |
<li> |
|
|
795 |
<a href="#menu-button-visualization">Menu Button Visualization</a> |
|
|
796 |
</li> |
|
|
797 |
<li> |
|
|
798 |
<a href="#split-button-visualization">Split Button Visualization</a> |
|
|
799 |
</li> |
|
|
800 |
<li> |
|
|
801 |
<a href="#menuitem-separators">MenuItem Separators</a> |
|
|
802 |
</li> |
|
|
803 |
</ul> |
|
|
804 |
</li> |
|
|
805 |
</ul> |
|
|
806 |
</li> |
|
|
807 |
<li> |
|
|
808 |
<a href="#styling-state">Styling State</a> |
|
|
809 |
<ul class="toc"> |
|
|
810 |
<li> |
|
|
811 |
<a href="#active-vs-inactive">Active vs. Inactive</a> |
|
|
812 |
</li> |
|
|
813 |
<li> |
|
|
814 |
<a href="#visible-vs-hidden">Visible vs. Hidden</a> |
|
|
815 |
</li> |
|
|
816 |
</ul> |
|
|
817 |
</li> |
|
|
818 |
<li> |
|
|
819 |
<a href="#configuration-attributes">Configuration Attributes</a> |
|
|
820 |
</li> |
|
|
821 |
<li> |
|
|
822 |
<a href="#handling-events">Handling Events</a> |
|
|
823 |
</li> |
|
|
824 |
<li> |
|
|
825 |
<a href="#iframe-shim"><code><iframe></code> Shim</a> |
|
|
826 |
</li> |
|
|
827 |
</ul> |
|
|
828 |
</li> |
|
|
829 |
<li> |
|
|
830 |
<a href="#css-reference">CSS reference</a> |
|
|
831 |
</li> |
|
|
832 |
<li> |
|
|
833 |
<a href="#known-issues">Known Issues</a> |
|
|
834 |
</li> |
|
|
835 |
</ul> |
|
|
836 |
</div> |
|
|
837 |
</div> |
|
|
838 |
|
|
|
839 |
|
|
|
840 |
|
|
|
841 |
<div class="sidebox"> |
|
|
842 |
<div class="hd"> |
|
|
843 |
<h2 class="no-toc">Examples</h2> |
|
|
844 |
</div> |
|
|
845 |
|
|
|
846 |
<div class="bd"> |
|
|
847 |
<ul class="examples"> |
|
|
848 |
|
|
|
849 |
|
|
|
850 |
<li data-description="Creating left navigation using the MenuNav Node Plugin."> |
|
|
851 |
<a href="menunav-leftnav.html">Basic Left Nav</a> |
|
|
852 |
</li> |
|
|
853 |
|
|
|
854 |
|
|
|
855 |
|
|
|
856 |
<li data-description="Creating top navigation using the MenuNav Node Plugin"> |
|
|
857 |
<a href="node-menunav-2.html">Basic Top Nav</a> |
|
|
858 |
</li> |
|
|
859 |
|
|
|
860 |
|
|
|
861 |
|
|
|
862 |
<li data-description="Creating menu button navigation using the MenuNav Node Plugin"> |
|
|
863 |
<a href="node-menunav-3.html">Menu Button Top Nav</a> |
|
|
864 |
</li> |
|
|
865 |
|
|
|
866 |
|
|
|
867 |
|
|
|
868 |
<li data-description="Creating split button navigation using the MenuNav Node Plugin"> |
|
|
869 |
<a href="node-menunav-4.html">Split Button Top Nav</a> |
|
|
870 |
</li> |
|
|
871 |
|
|
|
872 |
|
|
|
873 |
|
|
|
874 |
<li data-description="Adding shadows to submenus of a left nav using the MenuNav Node Plugin"> |
|
|
875 |
<a href="node-menunav-5.html">Left Nav with Submenus with Shadows</a> |
|
|
876 |
</li> |
|
|
877 |
|
|
|
878 |
|
|
|
879 |
|
|
|
880 |
<li data-description="Adding rounded corners to submenus of a left nav using the MenuNav Node Plugin"> |
|
|
881 |
<a href="node-menunav-6.html">Left Nav With Submenus With Rounded Corners</a> |
|
|
882 |
</li> |
|
|
883 |
|
|
|
884 |
|
|
|
885 |
|
|
|
886 |
<li data-description="Skining a menu built using the MenuNav Node Plugin to look like the menus on Flickr"> |
|
|
887 |
<a href="node-menunav-7.html">Skinning Menus Created Using the MenuNav Node Plugin</a> |
|
|
888 |
</li> |
|
|
889 |
|
|
|
890 |
|
|
|
891 |
</ul> |
|
|
892 |
</div> |
|
|
893 |
</div> |
|
|
894 |
|
|
|
895 |
|
|
|
896 |
|
|
|
897 |
</div> |
|
|
898 |
</div> |
|
|
899 |
</div> |
|
|
900 |
</div> |
|
|
901 |
|
|
|
902 |
<script src="../assets/vendor/prettify/prettify-min.js"></script> |
|
|
903 |
<script>prettyPrint();</script> |
|
|
904 |
|
|
|
905 |
<script> |
|
|
906 |
YUI.Env.Tests = { |
|
|
907 |
examples: [], |
|
|
908 |
project: '../assets', |
|
|
909 |
assets: '../assets/node-menunav', |
|
|
910 |
name: 'node-menunav', |
|
|
911 |
title: 'MenuNav Node Plugin', |
|
|
912 |
newWindow: '', |
|
|
913 |
auto: false |
|
|
914 |
}; |
|
|
915 |
YUI.Env.Tests.examples.push('menunav-leftnav'); |
|
|
916 |
YUI.Env.Tests.examples.push('node-menunav-2'); |
|
|
917 |
YUI.Env.Tests.examples.push('node-menunav-3'); |
|
|
918 |
YUI.Env.Tests.examples.push('node-menunav-4'); |
|
|
919 |
YUI.Env.Tests.examples.push('node-menunav-5'); |
|
|
920 |
YUI.Env.Tests.examples.push('node-menunav-6'); |
|
|
921 |
YUI.Env.Tests.examples.push('node-menunav-7'); |
|
|
922 |
|
|
|
923 |
</script> |
|
|
924 |
<script src="../assets/yui/test-runner.js"></script> |
|
|
925 |
|
|
|
926 |
|
|
|
927 |
|
|
|
928 |
</body> |
|
|
929 |
</html> |