Comments (20)
Please fix this! The fix from slimsoft from over a year ago works, why hasn't it been integrated? I don't want to edit a node module!
from metismenu.
Hi!
Hava the problem solved in this branch: https://github.com/pereiradiogo/metismenu/tree/fix_parent_menus
@onokumus Check de PR
from metismenu.
I have the same problem, I tried the new version 2.0.0 and the behaviour is the same in all versions.
Thanks.
from metismenu.
+1, please can you fix it?
Thanks in advance!
from metismenu.
Same here! Any fixes?
from metismenu.
<ul id="sidebar-left-menu">
<li data="{autoShowFlg:0,menuUnder:''}" id="LSMS04000000">
<a href="javascript:addNewTab('Admin','user.action',300)">
<i class="glyphicon glyphicon-chevron-right"></i>
<span class="sidebar-link1">ADMIN</span>
</a>
<!-- Sub menu -->
<ul class="collapse" style="height: 0px;">
<li data="{autoShowFlg:0,menuUnder:'LSMS04000000'}" id="LSMS04100000">
<a href="#">
<i class="glyphicon glyphicon-chevron-right"></i>
<span class="sidebar-link1">MANAGEMENT</span>
</a>
<!-- Sub menu -->
<ul class="collapse" style="height: 0px;">
<li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04110000">
<a href="javascript:addNewTab('Role Group','roleGroup.action',300)">
<i class="glyphicon glyphicon-chevron-right"></i>
<span class="sidebar-link1">ROLE GROUP</span>
</a>
</li>
<li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04120000">
<a href="javascript:addNewTab('Role','role.action',300)">
<i class="glyphicon glyphicon-chevron-right"></i>
<span class="sidebar-link1">ROLE</span>
</a>
</li>
<li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04130000">
<a href="javascript:addNewTab('User','user.action',300)">
<i class="glyphicon glyphicon-chevron-right"></i>
<span class="sidebar-link1">USER</span>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
I have same problem. Sub of sub menu is not collapse when I click root menu to close toggle.
from code when I click menu "Admin" and click "MANAGEMENT". After that I click Admin for toggle close of all the menu "MANAGEMENT" level is toggle close. But "ROLE GROUP, ROLE, USER" is not close toggle.
Could you please fix that?
update : from version 1.1.3 i change from
$(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide");
to
$(this).parent("li").find('li').removeClass("active").children("ul.in").collapse("hide");
from metismenu.
Same problem here. I'm using this with ember.js which uses single page routing, the toggle function does not work. Any fix for this?
Also. Going directly to a hash based route (http://dom.com/#/some/route) causes the menu to be fully expanded on load. Not sure if this is an issue with my setup, or with the plugin itself.
from metismenu.
I managed to fix the specific problem I was having by adding another "click" listener for the sub menu links.
this.$element.find('li').not(':has(ul)').children('a').on('click.metisMenu', function() {
if ($this.options.toggle) {
var $parent = $(this).closest('ul.in');
$this.hide($parent);
}
});
As for my second issue, it actually came down to having some matching (temporary) links that were going to "#", which matched the current page, so the plugin was marking them "active" and expanding the groups. Not really an issue with the plugin itself.
from metismenu.
+1
from metismenu.
Hi, here is a listener to inject into metisMenu which works fine.
var that = this;
this.$element.children('li').not(':has(ul)').children('a').on('click.metisMenu', function(e) {
if ($this.options.toggle) {
var $parent = that.$element.find('ul.in');
$this.hide($parent);
}
});
from metismenu.
Hello there,
I'm having an issue similar to the one reported by @laszlof and I haven't been able to find the solution yet. I doesn't matter how deep the menu is, when the url ends with a hashtag (http://localhost/myApp/# as an example) the entire menu is fully expanded on load. Any thoughts on how to solve it?.
Cheers.
from metismenu.
Any solution to this? Thanks!!
from metismenu.
Replace your dummy href="#" with href="#any-word", worked for me. :)
from metismenu.
I think I have this problem too. My menu have some menus without submenus and some menus with submenus. When a menu with submenu is open, and I click on a menu without submenu, the previous menu with submenu open doesn't collapse.
I want to use metis release without modifying myself the lib. any idea ?
from metismenu.
Please fix it!
from metismenu.
@dzaeny @serloal @pballester @Zephyrante @jirapatj @laszlof @lenamtl @slimsoft @jujoramos @harrywang @elvis7 @MoxFulder @PTC-JoshuaMatthews @gsag
Please try https://github.com/onokumus/metismenu/tree/parent-toogle
from metismenu.
I still have the same issue using the parent-toggle branch.
from metismenu.
I have the same bug..
from metismenu.
Wow... what an old bug! I'm having this trouble now and just discovered this is here over 3 years!
@onokumus this menu is beautiful, and I really want to fix it to stay with it! Can you please do the fix suggested or help us with the better way to do it? Thank you for the component anyway!
Is parent-toggle a branch just to solve this problem? Will it be merged to master?
from metismenu.
News?
from metismenu.
Related Issues (20)
- When clicking anywhere besides inside of side menu, side menu should get closed HOT 1
- Version v3 not work in IE11 HOT 3
- htmlelement type for menu element HOT 1
- 3.0.0-beta vs 3.0.3 HOT 2
- vue 中如何使用
- Problem with last version 3.0.4 HOT 13
- Clicking a link prevent navigate to the page HOT 5
- The opened < ul> element not collapse on click the <li> which do not have child <ul>.and also want to add active class to the <li> to those which do not have child<ul>
- Add SCSS styles
- Not Workin HOT 1
- Second click on item removes mm-active class HOT 3
- Scroll to link if the link is active and out of screen HOT 2
- Laravel 7.x SCSS compile error
- demo website 404 HOT 1
- .has-arrow::after arrow icon is not aligned correctly
- error - TypeError: this is undefined 'r'
- Yet another TypeError: $(...).metisMenu is not a function
- MetisMenu highlighting all the links if anchor tag links doesnt end with .html
- Is about multiple init air datepicker
- Flash menu on page reload fix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metismenu.