Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar with "nav-sm" on current page always display child menu #286

Closed
federicoha opened this issue Sep 30, 2016 · 5 comments
Closed

Sidebar with "nav-sm" on current page always display child menu #286

federicoha opened this issue Sep 30, 2016 · 5 comments

Comments

@federicoha
Copy link

Hi All, first thanks for your amazing template.

Not sure if is an issue, so if you please confirm behavior will be great. When using <body class="nav-sm"> and menu find your current page, automatically show the child menu items for that father.

image
(yellow is the current and this is showing when page is loading)

I saw a similar wording change in pull request ([https://github.com//pull/281]) but not work for me.

Making a change in custom.js i was able to not show the child items and also reflect the active menu, but if i click again, lost the active, and the second click show the child menu

This is the change:

Commented line:
//$SIDEBAR_MENU.find('a').filter(function () { // return this.href == CURRENT_URL; //}).parent('li').addClass('current-page').parents('ul').slideDown(function () { // setContentHeight(); //}).parent().addClass('active');

New one:
$SIDEBAR_MENU.find('a').filter(function () { return this.href == CURRENT_URL; }).parent('li').addClass('current-page').parents('ul').parent().addClass('active active-sm');

Version i use is getting from bower and version is: "gentelella": "^1.3.0"

Thanks in advance.

@chocobot21
Copy link

remove this line :
.parent("li").addClass("current-page").parents("ul").slideDown(function() { e() })

custom.min.js

@federicoha
Copy link
Author

perfect, thanks!

@funilrys
Copy link

a simple way is to change/apply display:none to the object

@AndreiCN AndreiCN closed this as completed Dec 8, 2016
@freel132
Copy link

Non of these solutions worked for me. seems that what ever I am doing always when I am opening it displays open sub meniu.

@nelsonluiz
Copy link

Guys I need a help... I included a include page in div id=content where that links are going to open, and I would like that (when on mobile) in the moment the user clicks on a link the menu totaly disapare.

Can someone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants