Comments (4)
$( '#toggle-button' ).click(function(){
var menuExpanded = $( '#menu' ).multilevelpushmenu( 'menuexpanded' , $( '#menu' ).multilevelpushmenu( 'findmenusbytitle' , 'All Categories' ).first() );
if( menuExpanded ){
$( '#menu' ).multilevelpushmenu( 'collapse' );
}
else {
$( '#menu' ).multilevelpushmenu( 'expand' );
}
});
I copied code example from the following JSfiddle, http://jsfiddle.net/L3LrK/
from multi-level-push-menu.
Would it be possible to have the same but working with HTML markup menu ?
Many thanks :)
from multi-level-push-menu.
Thank you adgsm.
from multi-level-push-menu.
Thanks, I updated the code slightly and used the 'activemenu' as the second paramiter for the menu expanded function.
$( '#expand-button' ).click(function(){
var menu = $('#push-menu');
var menuExpanded = menu.multilevelpushmenu( 'menuexpanded', menu.multilevelpushmenu( 'activemenu' ) );
if( menuExpanded ){
menu.multilevelpushmenu( 'collapse' );
}
else {
menu.multilevelpushmenu( 'expand' );
}
});
from multi-level-push-menu.
Related Issues (20)
- Sorting HOT 4
- Problem with scrolling on Mobile device ( Android 6) HOT 3
- External button HOT 2
- Back text as a parent HOT 1
- Custom data through feed HOT 2
- Smooth scrolling on iOS Devices
- Show menu top upon clicking a menu item that has sub menu items under it HOT 2
- Auto expand or open specific child menu when loading a section HOT 1
- How to get menu level on 'onExpandMenuStart' and 'onCollapseMenuStart'? HOT 1
- Reverse sliding direction HOT 1
- move menu icon out of h2 tags and let it trigger the menu HOT 34
- Expanding to a level object when more than one have the same name HOT 2
- Blank menu during slide over animation HOT 1
- Remove all Menu items
- open menu @ media query
- Resize menu width automatically HOT 1
- fill data dynamic
- Add other element inside list tag HOT 1
- [Feature Helper ] JS Array Helper
- I cannot Scroll
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 multi-level-push-menu.