<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 ---------->
<nav class="navbar navbar-fixed-left navbar-minimal animate" role="navigation">
<div class="navbar-toggler animate">
<span class="menu-icon"></span>
</div>
<ul class=" navbar-menu animate">
<li><a href="#">Home</a></li>
<li ><a href="#">Profile</a></li>
<li ><a href="#">Messages</a></li>
<li><a href="#">Home</a></li>
<li ><a href="#">Profile</a></li>
<li ><a href="#">Messages</a></li>
</ul>
</nav>
.animate {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.navbar-fixed-left {
position: fixed;
top: 0px;
left: 0px;
border-radius: 0px;
}
.navbar-minimal {
width: 60px;
min-height: 60px;
max-height: 100%;
background-color: rgb(51, 51, 51);
background-color: rgba(51, 51, 51, 0.8);
border-width: 0px;
z-index: 1000;
}
.navbar-minimal > .navbar-toggler {
position: relative;
min-height: 60px;
border-bottom: 1px solid rgb(81, 81, 81);
z-index: 100;
cursor: pointer;
}
.navbar-minimal.open > .navbar-toggler,
.navbar-minimal > .navbar-toggler:hover {
background-color: rgb(158, 202, 59);
}
.navbar-minimal > .navbar-toggler > span {
position: absolute;
top: 50%;
right: 50%;
margin: -8px -8px 0 0;
width: 16px;
height: 16px;
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZ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ZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiNGRkZGRkYiIGQ9Ik0xLjMzLDI4Ljk3bDExLjY0LTExLjY0YzAuNDU5LTAuNDU5LDEuMjA0LTAuNDU5LDEuNjYzLDAKCWMwLjQ1OSwwLjQ1OSwwLjQ1OSwxLjIwNCwwLDEuNjYzTDIuOTkzLDMwLjYzM2MtMC40NTksMC40NTktMS4yMDQsMC40NTktMS42NjMsMEMwLjg3MSwzMC4xNzQsMC44NzEsMjkuNDMsMS4zMywyOC45N3oiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiNGRkZGRkYiIGQ9Ik0yLjk5MywxNy4zM2wxMS42NDEsMTEuNjRjMC40NTksMC40NTksMC40NTksMS4yMDQsMCwxLjY2MwoJcy0xLjIwNCwwLjQ1OS0xLjY2MywwTDEuMzMsMTguOTkzYy0wLjQ1OS0wLjQ1OS0wLjQ1OS0xLjIwNCwwLTEuNjYzQzEuNzg5LDE2Ljg3MSwyLjUzNCwxNi44NzEsMi45OTMsMTcuMzN6Ii8+Cjwvc3ZnPgo=);
background-repeat: no-repeat;
background-position: 0 0;
-webkit-transition: -webkit-transform .3s ease-out 0s;
-moz-transition: -moz-transform .3s ease-out 0s;
-o-transition: -moz-transform .3s ease-out 0s;
-ms-transition: -ms-transform .3s ease-out 0s;
transition: transform .3s ease-out 0s;
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
.navbar-minimal > .navbar-menu {
position: absolute;
top: -1000px;
left: 0px;
margin: 0px;
padding: 0px;
list-style: none;
z-index: 50;
background-color: rgb(51, 51, 51);
background-color: rgba(51, 51, 51, 0.8);
}
.navbar-minimal > .navbar-menu > li > a {
position: relative;
display: inline-block;
color: rgb(255, 255, 255);
padding: 20px 23px;
text-align: center;
cursor: pointer;
border-bottom: 1px solid rgb(81, 81, 81);
width: 100%;
text-decoration: none;
margin: 0px;
}
.navbar-minimal > .navbar-menu > li > a:last-child {
border-bottom-width: 0px;
}
.navbar-minimal > .navbar-menu > li > a:hover {
background:rgb(158, 202, 59);
}
.navbar-minimal > .navbar-menu > li > a > .glyphicon {
float: right;
}
.navbar-minimal.open {
width: 300px;
}
.navbar-minimal.open > .navbar-toggler > span {
background-position: 0 -16px;
-webkit-transform: rotate(-180deg);
-moz-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.navbar-minimal.open > .navbar-menu {
top: 60px;
width: 100%;
min-height: 100%;
}
@media (min-width: 768px) {
.navbar-minimal.open {
width: 300px;
}
.navbar-minimal.open > .navbar-menu {
overflow: visible;
}
.navbar-minimal > .navbar-menu > li > a > .desc {
position: absolute;
display: inline-block;
top: 50%;
left: 130px;
margin-top: -20px;
margin-left: 20px;
text-align: center;
white-space: nowrap;
padding: 10px 13px;
border-width: 0px !important;
background-color: rgb(51, 51, 51);
background-color: rgba(51, 51, 51, 0.8);
opacity: 0;
}
}
$(function () {
/* START OF DEMO JS - NOT NEEDED */
if (window.location == window.parent.location) {
$('#fullscreen').html('<span class="glyphicon glyphicon-resize-small"></span>');
$('#fullscreen').attr('href', 'http://bootsnipp.com/mouse0270/snippets/PbDb5');
$('#fullscreen').attr('title', 'Back To Bootsnipp');
}
$('#fullscreen').on('click', function(event) {
event.preventDefault();
window.parent.location = $('#fullscreen').attr('href');
});
$('#fullscreen').tooltip();
/* END DEMO OF JS */
$('.navbar-toggler').on('click', function(event) {
event.preventDefault();
$(this).closest('.navbar-minimal').toggleClass('open');
})
});
function htmlbodyHeightUpdate(){
var height3 = $( window ).height()
var height1 = $('.nav').height()+50
height2 = $('.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 = $('.main').height()
htmlbodyHeightUpdate()
});
});