Signin  Pricing  Examples  Support

Libraries > dropdownmenu.js

dropdownmenu.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://ianseo.net/templates/yoo_level/lib/js/addons/dropdownmenu.js


Libraries on ianseo.net


mod_yoo_scroller.js

accordionmenu.js

base.js

dropdownmenu.js

fancymenu.js

mootools-release-1.12.js

yoo_tools.js



Explore More


Tabbox.js

Tooltips.js

jquery.colorbox.js

1459780373index.js

dropdownmenu.js
				
/* Copyright (C) 2007 - 2009 YOOtheme GmbH */

var YOODropdownMenu = new Class({
	
	initialize: function(element, options) {
		this.setOptions({
			mode: 'default',
			duration: 600,
			transition: Fx.Transitions.linear,
			wait: false
		}, options);

		var reset = {'width': 0, 'height': 0, 'opacity': 0};

		switch(this.options.mode) {
			case 'width':
				reset = {'width': 0, 'opacity': 0};
		  		break;    
			case 'height':
				reset = {'height': 0, 'opacity': 0};
				break;
		}

		$$(element).each(function(li) {
			var ul = li.getElement('ul');
			if (ul) {
				var fx = new Fx.Styles(ul, this.options);
				var styles = ul.getStyles('width','height','opacity');
				ul.setStyles(reset);
				li.addEvents({
					mouseenter: function() {
						var parent = li.getParent();
						if (parent.getStyle('overflow') == 'hidden') parent.setStyle('overflow', 'visible');
						fx.element.setStyle('overflow', 'hidden');
						fx.start(styles);
					},
					mouseleave: function() {
						fx.stop();
						ul.setStyles(reset);	
					}
				});
			}     
		}.bind(this));
	}

});

YOODropdownMenu.implement(new Options);


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z