Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Diet"
Bootstrap 3.3.0 Snippet by
gabibarzu
3.3.0
jQuery
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
791
 
0 Fav
Post to Facebook
Tweet this
<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 ----------> <head> <meta charset="utf-8"> <!-- This file has been downloaded from Bootsnipp.com. Enjoy! --> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="/diet/header/headerStyle.css"> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="/diet/header/headerJs.js"></script> </head> <body> <nav class="navbar navbar-inverse navbar-static-top marginBottom-0" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#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="/diet/" >Diet</a> </div> <div class="collapse navbar-collapse" id="navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Active Link</a></li> <li><a href="#">Link</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li class="dropdown" id="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">My account <span class="caret"></span></a> <ul class="dropdown-menu" role="menu" id="dropdown-menu"> <li><a href="#">My Profile</a></li> <li><a href="#">Edit Profile</a></li> <li><a href="#">Change Password</a></li> <li><a href="#">Logout</a></li> </ul> </li> </ul> </div> </nav> </body>
body{ margin: none !important; width: 100% !important; } .marginBottom-0 { margin-bottom:0; } .dropdown-submenu{ position:relative; } .navbar-right{ margin-right:0px !important; } .dropdown-submenu>.dropdown-menu{ top:0; left:100%; margin-top:-6px; margin-left:-1px; -webkit-border-radius:0 6px 6px 6px; -moz-border-radius:0 6px 6px 6px; border-radius:0 6px 6px 6px; } .dropdown-submenu>a:after{ display:block; content:" "; float:right;width:0; height:0; border-color:transparent; border-style:solid; border-width:5px 0 5px 5px; border-left-color:#cccccc; margin-top:5px; margin-right:-10px; } .dropdown-submenu:hover>a:after{ border-left-color:#555; } .dropdown-submenu.pull-left{ float:none; } .dropdown-submenu.pull-left>.dropdown-menu{ left:-100%; margin-left:10px; -webkit-border-radius:6px 0 6px 6px; -moz-border-radius:6px 0 6px 6px; border-radius:6px 0 6px 6px; } .navbar-inverse { background-color: #00A2E8; color: #fff; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .active > a:hover { background-color: #00A2E8; } .navbar-inverse .navbar-nav > li > a{ color: #fff; font-size: 14px; }
(function($){ $(document).ready(function(){ $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass('open'); $(this).parent().toggleClass('open'); }); }); // Mouse hover $("#dropdown").hover( function() { $('#dropdown-menu', this).not('.in #dropdown-menu').stop(true,true).slideDown("400"); $(this).toggleClass('open'); }, function() { $('#dropdown-menu', this).not('.in #dropdown-menu').stop(true,true).slideUp("400"); $(this).toggleClass('open'); } ); })(jQuery);
Related:
See More
Template
Black Dashboard PRO React
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76