S
S
sanan :o2016-05-11 17:16:32
css
sanan :o, 2016-05-11 17:16:32

How to make a slide-out menu on the left/right?

Hey!
I need to make a menu, like here www.kakao.com/main The nuance
b5ee1d4e0f4d4aa79d4861ff577f1513.png
d265fd6a902a4e33a5009164df38c1f1.png
738fd50a681f4d3f8a8c41416603acc0.png
of this task is that the bootstrap is used, and if the user is from the desktop, these menus are opened in the same form, and the buttons that open them are hidden. From a mobile phone / tablet - they (the menus) are not visible, there are buttons - which should open the corresponding menu.
How to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mr_dev1l, 2016-05-11
@mr_dev1l

Normal check:

<nav id="menu">
<li>меню</li>
<li>меню</li>
<li>меню</li>
</nav>
<nav id="mobile-menu">
<li>меню</li>
<li>меню</li>
<li>меню</li>
</nav>

#mobile-menu {
 display:none;
}

var dispayWidth=$(window).width();
if (dispayWidth < 768) {
 $("#mobile-menu").css("display", "block");
 $("#menu").css("display", "none");
}
else {
 $("#mobile-menu").css("display", "none");
 $("#menu").css("display", "block");
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question