Opening topbar menu item from outside of the menu
Posted: 13 Sep 2021, 14:16
Hi,
During implementation of shepherdjs to our web app, i would like to trigger the profile-item submenu open. As I understand, to open and close menu is just add and remove class operation. Here is my problem.
I use Avalon 3.0.1. I can handle it by adding and removing css classes if i disable line 250 in layout.js. But this time topbar menu is not working as expected, submenu is not closed.
layout.js line 249-251:
opening submenu
closing submenu
I think line 250 removes active-top-menu class after adding it to open submenu. That's the reason why i cannot see the submenu opened.
How can i resolve this? Any idea?
During implementation of shepherdjs to our web app, i would like to trigger the profile-item submenu open. As I understand, to open and close menu is just add and remove class operation. Here is my problem.
I use Avalon 3.0.1. I can handle it by adding and removing css classes if i disable line 250 in layout.js. But this time topbar menu is not working as expected, submenu is not closed.
layout.js line 249-251:
Code: Select all
if(!$this.topbarMenuClick && !$this.topbarLinkClick) {
$this.topbarItems.find('.active-top-menu').removeClass('active-top-menu');
}
Code: Select all
const item = $('body > .layout-wrapper .topbar .topbar-items li.profile-item');
const submenu = $('body > .layout-wrapper .topbar .topbar-items li.profile-item ul');
item.addClass('active-top-menu');
submenu.addClass('fadeInDown');
Code: Select all
const item = $('body > .layout-wrapper .topbar .topbar-items li.profile-item');
const submenu = $('body > .layout-wrapper .topbar .topbar-items li.profile-item ul');
item.removeClass('active-top-menu');
submenu.removeClass('fadeInDown');
How can i resolve this? Any idea?