-
Notifications
You must be signed in to change notification settings - Fork 2
/
menu-zoom.html
111 lines (101 loc) · 4.33 KB
/
menu-zoom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bootstrap-mmenu-offcanvas</title>
<!-- Page styles -->
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="http://mmenu.frebsite.nl/mmenu/css/jquery.mmenu.all.css" />
<link type="text/css" rel="stylesheet" href="bootstrap-mmenu-offcanvas.css" />
<link type="text/css" rel="stylesheet" href="demo.css" />
</head>
<body>
<div id="page">
<nav id="menu">
<ul>
<li><a href="#"><span class="glyphicon glyphicon-flash"></span> Sample Link 1</a></li>
<li><a href="#"><span class="glyphicon glyphicon-tower"></span> Sample Link 2</a></li>
<li><a href="#"><span class="glyphicon glyphicon-bell"></span> Sample Link 3</a></li>
<li><a href="#"><span class="glyphicon glyphicon-plane"></span> Sample Link 4</a></li>
<li>
<a href="#"><span class="glyphicon glyphicon-leaf"></span> Level 1 Menu</a>
<ul>
<li><a href="#">First sub-item</a></li>
<li><a href="#">Second sub-item</a></li>
<li>
<a href="#">Level 2 Menu</a>
<ul>
<li><a href="#">First sub-item</a></li>
<li><a href="#">Second sub-item</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
<div class="mm-content-right container">
<div class="row">
<div class="col-md-12">
<h1>Demo 4</h1>
<h3>Zoom effect menu transitions.</h3>
<h3>Make your browser smaller to view responsive offcanvas menu.</h3>
</div>
</div>
<div class="row">
<div class="col-md-6">
<a href="index.html" class="btn btn-primary btn-lg btn-block">Demo 1: Menu left</a>
</div>
<div class="col-md-6">
<a href="menu-right.html" class="btn btn-primary btn-lg btn-block">Demo 2: Menu right</a>
</div>
</div>
<div class="row">
<div class="col-md-6">
<a href="submenu-vert.html" class="btn btn-primary btn-lg btn-block">Demo 3: Vertical submenu's</a>
</div>
<div class="col-md-6">
<a href="#" class="btn btn-primary btn-lg btn-block">Demo 4: Zoom effect transitions</a>
</div>
</div>
</div>
</div>
<!-- IMPORTANT: this tag must NOT be a <div> otherwise mmenu will wrap the navbar in the main page -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a href="#" class="navbar-brand hidden-xs"><strong>Project name</strong></a>
<a href="#" class="navbar-brand visible-xs pull-right"><strong>Project name</strong></a>
<div class="nav-toggle visible-xs">
<a href="#mobile-menu"></a>
</div>
</div>
<div class="collapse navbar-collapse" role="navigation">
<ul class="nav navbar-nav navbar-right hidden-xs">
<li><a href="#">Logged in as <strong>Admin</strong></a></li>
</ul>
</div>
</div>
</nav>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://mmenu.frebsite.nl/mmenu/js/jquery.mmenu.min.all.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var $menu = $("nav#menu");
var $mobmenu = $menu.clone();
$menu.addClass("hidden-xs");
$mobmenu.attr( "id", "mobile-menu" );
$mobmenu.mmenu({ classes: "mm-zoom-menu mm-zoom-panels" });
$menu.mmenu({ offCanvas: false, classes: "mm-zoom-panels" });
<!-- Close mobile menu when resizing browser window -->
$(window).resize(function() {
if ($(this).width() > 767) {
$mobmenu.trigger("close.mm");
}
});
});
</script>
</body>
</html>