Default Menu ( .menu-default) is the general menu that can be added to the header or anywhere else in the site content. It can have one or multiple levels(.submenu). Each menu element has the class .item.
<div class="menu-default">
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
<li><a href="" class="item">Item 02</a></li>
<li><a href="" class="item">Item 03</a></li>
<li><a href="" class="item">...</a></li>
<li class="has-submenu">
<a href="" class="item">Item with submenu</a>
<ul class="submenu">
<li><a href="" class="item">Submenu 01</a></li>
<li><a href="" class="item">Submenu 02</a></li>
<li><a href="" class="item">...</a></li>
</ul>
</li>
</ul>
</div>
Menu can have the following elements:
<ul class="main-menu">
<li><a href="" class="item">Simple Text</a></li>
<li><a href="" class="item">
<i class="icon icon-account-circle-1"></i>
<span>Icon and text</span>
</a>
</li>
<li><a href="" class="item"><img src="image_05.jpg" alt="">
<span>Image</span>
</a>
</li>
<li><input class="item" type="text" value="" placeholder="Input"></li>
<li>
<select class="item dropdown">
<option value="0">0</option>
...
</select>
</li>
<li>
<div class="fltp item">
<input type="text" value="" required>
<label class="placeholder" data-big-placeholder="FP Input" data-little-placeholder="This is an input example"></label>
</div>
</li>
<li>
<div class="fltpfltp item">
<select name="dropdown" size="13" class="dropdown" required>
<option value="0">0</option>
...
</select>
<label class="placeholder">FP Select</label>
</div>
</li>
</ul>
There are multiple settings applied to the menu that affect the position and width of the containing drop-downs.
By Default, menu drop-downs are left aligned to its parent. Using.dropdown-open-right, you can right align them.
<div class="menu-default dropdown-open-right">
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
<li><a href="" class="item">Item 02</a></li>
<li><a href="" class="item">Item 03</a></li>
<li><a href="" class="item">...</a></li>
<li class="has-submenu">
<a href="" class="item">Item with submenu</a>
<ul class="submenu">
<li><a href="" class="item">Submenu 01</a></li>
<li><a href="" class="item">Submenu 02</a></li>
<li><a href="" class="item">...</a></li>
</ul>
</li>
</ul>
</div>
.icons-left or .icons-right
This two classes have the role to align the icons from the text, left or right, no matter the order in HTML.
This alignment is available for any .item element that is inside a .submenu element and no matther the level.
<div class="menu-default icons-left">
<ul class="main-menu">
<li>
<a href="" class="item">
<i class="icon icon-account-circle-1"></i>
<span>Item 01</span>
</a>
</li>
<li>
<a href="" class="item">
<span>Item 01</span>
<i class="icon icon-account-circle-1"></i>
</a>
</li>
<li class="has-submenu">
<a href="" class="item">Here</a>
<ul class="submenu">
<li>
<a href="" class="item">
<span>Submenu 01</span>
<i class="icon icon-account-circle-1"></i>
</a>
</li>
<li>
<a href="" class="item">
<i class="icon icon-account-circle-1"></i>
<span>Submenu 02</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
.dropdown-fullwidth
This option transforms the dropdown width to 100% but its content will stay equal to the with of the .container element.
This feature is responsive. You can use the following classes depending on the resolution:
<div class="menu-default dropdown-fullwidth">
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
...
<li class="has-submenu">
<a href="" class="item">Item with submenu</a>
<ul class="submenu">
<li><a href="" class="item">Submenu 01</a></li>
<li><a href="" class="item">Submenu 02</a></li>
<li><a href="" class="item">...</a></li>
</ul>
</li>
</ul>
</div>
.dropdown-fluid-fullwidth
This option transforms the dropdown width and its content to 100%.
Transition to use when animating menu in and out. Defaults to slide down or slide up depending on dropdown direction.
To change the transition effect, you need to change the transition value in .dropdown() function from function.js file.
$(".has-submenu").dropdown({
on: "click",
transition: "fade up",
selector: {
menu: ".submenu",
item: ".item"
},
...
});
Other transition values:
Menus inside one header will inherit its specific styling - click here for header section styling.
Specific dropdown variables are found in header-section-module.variables and for top header section are:
Lorem ipsum
To avoid elements going outside the header container area, due to a high number of elements added to a header, we introduced the FlexMenu feature.
Adding class .flexMenu to .menu-default, will move the elements, that normally would go outside the screen area, into a submenu located at the end of the menu.
<div class="menu-default flexMenu dropdown-open-right">
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
...
</ul>
</div>
trimLongMenu: function () {
$(".flexMenu > ul").flexMenu({
popupAbsolute: false,
showOnHover: false,
linkText: "<a class="item hamburger hamburger-elastic"><span class="hamburger-box"><span class="hamburger-inner"></span></span></a>",
linkTextAll: "<a class="item hamburger hamburger-elastic"><span class="hamburger-box"><span class="hamburger-inner"></span></span></a>"
});
}
By default we are using hamburger icon module for flexMenu trigger.
Actually Flex Menu is a dropdown, so all the styles that are applied to this menu are in fact dropdown styles.
see dropdown styling
Defining burger menu notion, as any menu that has its content shown after a trigger/button action.
In .burger-default case, the menu content is inside a dropdown. .burger-default feature works together with .flexMenu.
Its trigger is generated by the .flexMenu() function.
click here to read more.
Opening direction is the one from the dropdown. By default the dropdown opens to the left and to open it to the right you need to use .dropdown-open-right class.
click here to read more.
Transition Effect is the one from the dropdown and it can be changed by reading this.
<div class="menu-default burger-default flexMenu">
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
...
</ul>
</div>
This feature is responsive. You can use the following classes depending on the resolution:
Actually .burger-default is a dropdown, so all the styles are dropdown styles.
see dropdown styling
Applying the class .burger-sidemenu to .menu-default, menu content will be positioned in one of the site sides. Content will become visible when actioning a trigger/button.
We will present how to build a burger sidemenu.
Specific trigger that opens mymenu01 has the class .sidemenu-trigger and looks like this:
<a href="" class="sidemenu-trigger" data-trigger-for="mymenu01">
<i class="icon icon-navigation-show-more-22"></i>
</a>
for :
<div class="burger-sidemenu" data-burger="mymenu01">
...
</div>
You can also use the hamburger icon module in a .sidemenu-trigger this way:
<a href="" class="sidemenu-trigger hamburger hamburger-spin item" data-trigger-for="menu01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
For more details on hamburger icon click here.
Opening Direction is required and needs to be specified on .burger-sidemenu element using the following classes:
<!-- Sidemenu Trigger with hamburger-->
<a href="" class="sidemenu-trigger hamburger hamburger-spin item" data-trigger-for="menu01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
<div class="burger-sidemenu sidemenu-open-right" data-burger="mymenu01">
...
</div>
There are several effects that can be used when opening/closing a burger sidemenu.
<div class="burger-sidemenu sidemenu-open-right uncover-sq" data-burger="mymenu01">
...
</div>
To close the .burger-sidemenu you can use the trigger inside or outside the menu.
There are many cases when opening the menu will make the trigger access inaccessible. In this case we can add a trigger inside the .menu-default that can close it.
<!-- Outside Sidemenu Trigger -->
<a href="" class="sidemenu-trigger hamburger hamburger-spin item" data-trigger-for="mymenu01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
<div class="menu-default" data-burger="mymenu01">
<!-- Inside Sidemenu Trigger or Close Sidemenu Trigger -->
<a href="" class="sidemenu-trigger hamburger hamburger-spin item" data-trigger-for="mymenu01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
...
</ul>
</div>
This feature is responsive. You can use the following classes depending on the resolution:
Menus inside the header will inherit the header specific styling - click here for header section styling.
Specific variables for .burger-sidemenu are found in header-section-module.variables and for top header are:
Applying .burger-modal class to .menu-default will make the menu content to appear inside a modal. Content will become visible when actioning a trigger.
The specific trigger that opens mymodal01 will have the .modal-trigger class and it looks like:
<a href="" class="modal-trigger" data-trigger-for="mymodal01">
<i class="icon icon-navigation-show-more-22"></i>
</a>
for :
<div class="burger-modal" data-burger="mymodal01">
...
</div>
You can also use the hamburger icon module in a .sidemenu-trigger this way:
<a href="" class="modal-trigger hamburger hamburger-spin item" data-trigger-for="mymodal01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
For more details on hamburger icon click here.
The only opening direction is from top to bottom.
The only transition effect is slide down.
To close the .burger-modal you can use the trigger inside as well as outside the menu.
Close trigger from inside the menu is exactly the same as the trigger detailed above.
<!-- Outside Modal Trigger -->
<a href="" class="modal-trigger hamburger hamburger-spin item" data-trigger-for="mymodal01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
<div class="menu-default burger-modal" data-burger="mymodal01">
<!-- Inside Modal Trigger or Close Modal Trigger -->
<a href="" class="modal-trigger hamburger hamburger-spin item" data-trigger-for="mymodal01">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</a>
<ul class="main-menu">
<li><a href="" class="item">Item 01</a></li>
...
</ul>
</div>
This feature is responsive. You can use the following classes depending on the resolution:
Menus inside the header will inherit the header specific styling - click here for header section styling.
The variable for burger modal can be found in header-section-module.variables and for top header is:
<header class="header-section ths"> ... </header>
<header class="header-section mhs"> ... </header>
<header class="header-section bhs"> ... </header>