Full screen navigation with toggle.
bower install trendwerk/toggle-navigation --save
Using toggle-navigation
is a two-step process:
- SCSS:
@include
the mixin on your header. The header should contain your main navigation; - JS: Initialize your toggle button.
@include toggle-navigation((
'height': 80px,
'menu': '.menu-selector',
));
$('.toggle-selector').toggleNavigation();
A more common setup is to include the item
and until
parameters:
@include toggle-navigation((
'height': 80px,
'item': '.item-selector',
'menu': '.menu-selector',
'until': 981px,
));
@include toggle-navigation((
'background': null,
'bottom-space': 80px,
'height': null,
'item': null,
'menu': null,
'speed': 0.4s,
'until': null,
));
Background for the full screen navigation when opened.
The spacing below the main navigation.
The height of the header when the main navigation is closed. This is necessary to properly animate the opening of the header.
The CSS selector of the items in the main navigation. Setting this option animates the menu items in sequence.
The CSS selector for the main navigation.
Animation speed.
A breakpoint (in pixels) until which the full screen navigation should be used.