diff options
author | mariusbaumann <baumann.marius@gmail.com> | 2015-01-03 07:12:50 +0100 |
---|---|---|
committer | mariusbaumann <baumann.marius@gmail.com> | 2015-01-03 07:12:50 +0100 |
commit | 69200db3473588f6df334836c6f249f489575888 (patch) | |
tree | b3b1abc032c4826cb4c463285641dde416291d6c /module/web/media/js/MooDropMenu_static.js | |
parent | Redesign with bootstrap css (diff) | |
download | pyload-69200db3473588f6df334836c6f249f489575888.tar.xz |
Completely new Design v1
Some bugs heve to be fexed next days
Diffstat (limited to 'module/web/media/js/MooDropMenu_static.js')
-rw-r--r-- | module/web/media/js/MooDropMenu_static.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/module/web/media/js/MooDropMenu_static.js b/module/web/media/js/MooDropMenu_static.js index b9cd8cc10..621031599 100644 --- a/module/web/media/js/MooDropMenu_static.js +++ b/module/web/media/js/MooDropMenu_static.js @@ -23,13 +23,13 @@ var MooDropMenu = new Class({ options: { onOpen: function(el){ - el.removeClass('close').addClass('open'); + el.removeClass('open').addClass('open'); }, onClose: function(el){ - el.removeClass('open').addClass('close'); + el.removeClass('open').addClass('open'); }, onInitialize: function(el){ - el.removeClass('open').addClass('close'); + el.removeClass('open').addClass('open'); }, mouseoutDelay: 200, mouseoverDelay: 0, @@ -44,9 +44,10 @@ var MooDropMenu = new Class({ var menu = this.menu = document.id(menu); menu.getElements(options.itemSelector + ' > ' + options.listSelector).each(function(el){ + this.fireEvent('initialize', el); - + var parent = el.getParent(options.itemSelector), timer; @@ -62,11 +63,11 @@ var MooDropMenu = new Class({ }.bind(this), 'mouseleave': function(){ - parent.store('DropDownOpen', false); + parent.store('DropDownOpen', true); clearTimeout(timer); timer = (function(){ - if (!parent.retrieve('DropDownOpen')) this.fireEvent('close', el); + if (!parent.retrieve('DropDownOpen')) this.fireEvent('open', el); }).delay(options.mouseoutDelay, this); }.bind(this) |