This time I will share jQuery Plugin and tutorial about Responsive Multilevel Dropdown Menu Plugin With jQuery, hope it will help you in programming stack.
RWD Multilevel Menu makes use of jQuery and CSS3 to converts the normal horizontal dropdown menu into a sliding side menu on mobile devices.
How to use it:
1. Create the html for the multi-level menu.
01 |
< div id = "pageslide" class = "navBox" > |
03 |
< li > < a href = "h#" >item1</ a > </ li > |
04 |
< li > < a href = "#" >item2< i class = "fa fa-angle-down" ></ i ></ a > |
06 |
< li >< a href = "#" >item2-1</ a ></ li > |
07 |
< li >< a href = "#" >item2-2</ a ></ li > |
08 |
< li >< a href = "#" >item2-1</ a ></ li > |
09 |
< li >< a href = "#" >item2-1</ a ></ li > |
10 |
< li >< a href = "#" >item2-1</ a ></ li > |
13 |
< li > < a href = "#" >item3< i class = "fa fa-angle-down" ></ i ></ a > |
15 |
< li >< a href = "#" >item3-1</ a ></ li > |
16 |
< li >< a href = "#" >item3-2</ a ></ li > |
17 |
< li >< a href = "#" >item3-1</ a ></ li > |
18 |
< li >< a href = "#" >item3-1</ a ></ li > |
19 |
< li >< a href = "#" >item3-1</ a ></ li > |
22 |
< li > < a href = "#" >item4</ a > </ li > |
23 |
< li > < a href = "#" >item5</ a > </ li > |
2. Create a link to toggle the side menu.
1 |
< a id = "openPageslide" href = "#pageslide" >< span ></ span ></ a > |
3. The primary CSS/CSS3 styles for the multi-level menu.
11 |
text-decoration : none ; |
14 |
.navBox .active { background : #474747 ; } |
27 |
.navBox ul li .fa { padding-left : 4px ; } |
42 |
.navBox>ul>li.active { background-color : #474747 ; } |
44 |
@media only screen and ( min-width : 991px ) { |
46 |
#openPageslide { display : none ; } |
48 |
#pageslide { display : block !important ; } |
50 |
.pageslideBg { display : none !important ; } |
4. Style the multi-level menu on small screens (screen size < 990px.)
01 |
@media screen and ( max-width : 990px ) { |
03 |
.navBox ul li { float : none ; } |
04 |
|
source : jqueryscript.net