mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* mttMenu adds item-active class to caller of submenu
This commit is contained in:
parent
b548e0e17a
commit
08a28fcb46
2 changed files with 9 additions and 8 deletions
15
src/ajax.js
15
src/ajax.js
|
|
@ -1159,21 +1159,22 @@ function mttMenu(container, options)
|
|||
}
|
||||
);
|
||||
|
||||
submenu.container.find('li').click(function()
|
||||
{
|
||||
submenu.root.onclick(this, submenu);
|
||||
return false;
|
||||
})
|
||||
.hover(
|
||||
submenu.container.hover(
|
||||
function(){
|
||||
clearTimeout(hideTimer);
|
||||
submenu.$caller.addClass('mtt-menu-item-active');
|
||||
},
|
||||
function(){
|
||||
hideTimer = setTimeout(function(){
|
||||
submenu.hide();
|
||||
}, 400);
|
||||
submenu.$caller.removeClass('mtt-menu-item-active');
|
||||
}
|
||||
);
|
||||
)
|
||||
.find('li').click(function(){
|
||||
submenu.root.onclick(this, submenu);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
//if(!this.root)
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
|||
}
|
||||
.mtt-btnmenu-container ul { list-style: none; padding:0; margin:0; }
|
||||
.mtt-btnmenu-container li { margin:1px 0px; padding:2px 3px; cursor:pointer; color:#000; white-space:nowrap; }
|
||||
.mtt-btnmenu-container li:hover { background-color:#316AC5; color:white; }
|
||||
.mtt-btnmenu-container li:hover, .mtt-btnmenu-container li.mtt-menu-item-active { background-color:#316AC5; color:white; }
|
||||
.mtt-btnmenu-container li.mtt-disabled { color:#ACA899; }
|
||||
.mtt-btnmenu-container a { display:block; text-decoration:none; outline:none; color:#000; }
|
||||
.mtt-btnmenu-container li:hover a { color:white; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue