"responsive sidebar menu - modified"
Bootstrap 3.3.0 Snippet by skandamallapa

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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- Based on http://bootsnipp.com/snippets/featured/responsive-sidebar-menu -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<nav class="navbar navbar-m2p sidebar" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-sidebar-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
Foobar<b>Company</b>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-sidebar-navbar-collapse-1">
<ul class="nav navbar-nav">
<!-- Dashboard -->
<li class="active open">
<a href="#">
<span class="pull-right hidden-xs showopacity glyphicon material-icons">av_timer</span> Dashboard
</a>
</li>
<!-- Banner -->
<li class="">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="menu-icon pull-right hidden-xs showopacity glyphicon material-icons">burst_mode</span>
Banners <span class="caret"></span>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
body,html{
height: 100%;
}
/* remove outer padding */
.container-main .row{
padding: 0px;
margin: 0px;
}
/*Remove rounded coners*/
nav.sidebar.navbar {
border-radius: 0px;
}
nav.sidebar, .container-main{
-webkit-transition: margin 200ms ease-out;
-moz-transition: margin 200ms ease-out;
-o-transition: margin 200ms ease-out;
transition: margin 200ms ease-out;
}
/* Icons */
.menu-icon {
font-size: 20px;
}
/* Add gap to nav and right windows.*/
/*.container-main{
padding: 10px 10px 0 10px;
}*/
/* Colors */
.navbar-m2p {
background-color: #00464f;
border-color: #00464f;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function htmlbodyHeightUpdate() {
var height3 = $(window).height();
var height1 = $('.nav').height() + 50;
height2 = $('.container-main').height();
if (height2 > height3) {
$('html').height(Math.max(height1, height3, height2) + 10);
$('body').height(Math.max(height1, height3, height2) + 10);
} else
{
$('html').height(Math.max(height1, height3, height2));
$('body').height(Math.max(height1, height3, height2));
}
}
$(document).ready(function () {
htmlbodyHeightUpdate();
$(window).resize(function () {
htmlbodyHeightUpdate();
});
$(window).scroll(function () {
height2 = $('.container-main').height();
htmlbodyHeightUpdate();
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: