ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

adding multiple menus #36

Closed brennanjenkins closed 10 years ago

brennanjenkins commented 10 years ago

I have successfully added a menu to a site that i am working on, however there is also a sub-menu that i am wanting to do the same to, i have added it but cannot move it to the position that i want it to be or restyle it as it has the same class name as the main menu. is there a way to change the name of the new class name that it gets changed to?

ComputerWolf commented 10 years ago

@brennanjenkins, you can simply add a placeholder with a specific id or class. You can then prepend the submenu slicknav to the placeholder and use the submenu's placeholder id/class to apply the style.

Javascript:

$('#main-menu').slicknav({
    prependTo:'#main-menu-placeholder'
});

$('#sub-menu').slicknav({
    prependTo:'#sub-menu-placeholder'
});

CSS:

#main-menu-placeholder .slicknav_menu {}

#sub-menu-placeholder .slicknav_menu {}
mzora commented 8 years ago

@brennanjenkins Hi Jenna! could you send me your solution a about the use of this multiple menu? i'm not good with js yet..