"Rightsidebar-toggle- Jenny"
Bootstrap 3.3.0 Snippet by ajavillo

<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 ----------> <div id="wrapper-right" class=""> <!-- Sidebar --> <!-- Sidebar --> <div id="sidebar-wrapper-right"> <ul id="sidebar_menu" class="sidebar-nav-right"> <li class="sidebar-brand-right"><a id="menu-toggle-right" href="#">Menu<span id="main_icon" class="glyphicon glyphicon-align-justify"></span></a></li> </ul> <ul class="sidebar-nav-right" id="sidebar-right"> <li><a>Link1<span class="sub_icon glyphicon glyphicon-link"></span></a></li> <li><a>link2<span class="sub_icon glyphicon glyphicon-link"></span></a></li> </ul> </div> <!-- Page content --> <div id="page-content-wrapper-right"> <!-- Keep all page content within the page-content inset div! --> <div class="page-content-right inset"> <div class="row"> <div class="col-md-12"> <p class="well lead">An Experiment using the sidebar template from startbootstrap.com which I integrated in my website (<a href="http://animeshmanglik.name">animeshmanglik.name</a>)</p> <p class="well lead">Click on the Menu to Toggle Sidebar . Hope you enjoy it!</p> <p class="well lead">Click on the Menu to Toggle Sidebar . Hope you enjoy it!</p> </div> </div> </div> </div> </div>
.row{ margin-left:0px; margin-right:0px; } #wrapper-right { padding-right: 70px; transition: all .4s ease 0s; height: 100%; } #sidebar-wrapper-right { margin-right: -150px; right: 70px; width: 150px; background: #222; position: fixed; height: 100%; z-index: 10000; transition: all .4s ease 0s; } .sidebar-nav-right { display: block; float: right; width: 150px; list-style: none; margin: 0; padding: 0; } #page-content-wrapper-right { padding-left: 0; margin-left: 0; width: 100%; height: auto; } #wrapper-right.active { padding-right: 150px; } #wrapper-right.active #sidebar-wrapper-right { right: 150px; } #page-content-wrapper-right { width: 100%; } #sidebar_menu-right li a, .sidebar-nav-right li a { color: #999; display: block; float: right; text-decoration: none; width: 150px; background: #252525; border-top: 1px solid #373737; border-bottom: 1px solid #1A1A1A; -webkit-transition: background .5s; -moz-transition: background .5s; -o-transition: background .5s; -ms-transition: background .5s; transition: background .5s; } .sidebar_name { padding-top: 25px; color: #fff; opacity: .7; } .sidebar-nav-right li { line-height: 40px; text-indent: 20px; } .sidebar-nav-right li a { color: #999999; display: block; text-decoration: none; } .sidebar-nav-right li a:hover { color: #fff; background: rgba(255,255,255,0.2); text-decoration: none; } .sidebar-nav-right li a:active, .sidebar-nav-right li a:focus { text-decoration: none; } .sidebar-nav-right > .sidebar-brand { height: 65px; line-height: 60px; font-size: 18px; } .sidebar-nav-right > .sidebar-brand a { color: #999999; } .sidebar-nav-right > .sidebar-brand a:hover { color: #fff; background: none; } #main_icon { float: left; padding-left: 5px; padding-top: 10px; padding-right: 20px; } .sub_icon { float: left; padding-left: 5px; padding-top: 10px; padding-right: 20px; } .content-header { height: 65px; line-height: 65px; } .content-header h1 { margin: 0; margin-left: 20px; line-height: 65px; display: inline-block; } @media (max-width:767px) { #wrapper-right { padding-right: 70px; transition: all .4s ease 0s; } #sidebar-wrapper-right { right: 70px; } #wrapper-right.active { padding-right: 150px; } #wrapper-right.active #sidebar-wrapper-right { right: 150px; width: 150px; transition: all .4s ease 0s; } }
$("#menu-toggle-right").click(function(e) { e.preventDefault(); $("#wrapper-right").toggleClass("active"); });

Related: See More


Questions / Comments:

Content should not be pushed, how can I do? Please share the code

Arvind Sharma () - 6 years ago - Reply 0