• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    NetMusician Menu Nav (gallery-nmmenus) on cdn

    Last Updated: 05/3/13
    + 2 -

    Joe Auty

    YUI Contributor

    See 2 more by this user.

    Created: 06/7/11
    Last CDN Push: 05/2/13
    Build Tag: gallery-2013.05.02-22-59
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.10.0
    Free for use.

    Menu navigation which utilizes YUI 3 Transitions for smooth and responsive feedback, mouseenter/mouseleave for simple event triggering for when menus should be shown/hidden, and custom Javascript triggers to invoke your own functions when certain menu items are selected

    • Tags:
    • netmusician
    • menu navigation
    • besson3c
    • bokug
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    See https://github.com/joeauty/NetMusician-Menu-Nav-YUI-Widget/blob/master/README.md

    Code Sample

    <script src="http://yui.yahooapis.com/3.10.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2013.05.02-22-59'
    }).use('gallery-nmmenus', 'event-delegate', function(Y) {
    	var config = {
    		anim:'blind',
    		ajaxLoadFunc:Y.bind(ajaxLoadFunc),
    		pulses:2,
    		pulseduration:0.3
    	}
     
    	var nmmenu = new Y.NMMenus(config);
     
    	function ajaxLoadFunc(nmmenu) {
    		Y.all('#' + nmmenu.get('menudivid') + ' li a.topLink').each(function(node) {
    			node = node.get('parentNode');
     
    			Y.delegate('click', function(e) {
    				if (this.get('href').match(/#$/) && this.hasClass('topLink')) {
    					// cancel click
    					e.preventDefault();
    					return;
    				}
    				else if (Y.one('#' + this.get('id')).hasClass('noajax')) { 
    					// abort, but do not cancel click
    					return; 
    				}
    				e.preventDefault();
    				if (this.hasClass('topLink')) {
    					// top level link, do not init pulsate
    					ajaxLoadTrigger({
    						page:this.get('pathname'),
    						id:this.get('id')
    					})
    				}
    				else {
    					nmmenu.menuItemPulsate(this.get('id'), ajaxLoadTrigger, {
    						page:this.get('pathname'),
    						id:this.get('id')
    					});	
    				}			
    			}, node, 'a');		
    		});
    	}
     
    	function ajaxLoadTrigger(configObj) {
    		switch (configObj.id) {
    			case 'menu_JohnColtrane':
    			//alert('do Coltrane thing');
    			break;
     
    			case 'menu_MilesDavis':
    			alert('do Miles Davis thing');
    			break;
     
    			default:
    			window.location.href = configObj.page;
    			break;
    		}
    	}
    });

    Forum Posts

    No forum posts for this module.

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info