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
"Panel Menu (4 levels)"
Bootstrap 3.3.0 Snippet by
danwfuk
3.3.0
panel
menu
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
4.1K
 
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 ----------> <div class="container"> <nav class="navbar navbar-default"> <div class="navbar-header"> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".js-navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse js-navbar-collapse"> <ul class="nav navbar-nav"> <li class=""> <a href="#" class="">Home</a> </li> <li class="dropdown mega-dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">About Us <span class="glyphicon glyphicon-chevron-down"></span></a> <ul class="dropdown-menu"> <li><a href="#">Directors</a></li> <li><a href="#">Our Vision</a></li> <li><a href="#">History</a></li> <li><a href="#">Corporate Governance</a></li> <li><a href="#">Key Advisors</a></li> </ul> </li> <li class="dropdown mega-dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Investor & Media <span class="glyphicon glyphicon-chevron-down"></span></a> <ul class="dropdown-menu"> <li><a href="#">Aim Rule 26</a></li> <li><a href="#">Presentations</a></li> <li><a href="#">Financial Reports</a></li> <li><a href="#">Media Coverage</a></li> <li><a href="#">Research</a></li> <li><a href="#">Warning to shareholders</a></li> </ul> </li> <li class=""> <a href="#">News Releases</a> </li> <li class="dropdown mega-dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Projects <span class="glyphicon glyphicon-chevron-down"></span></a> <ul class="dropdown-menu mega-dropdown-menu"> <li class=""> <ul class="row"> <li class="col-sm-12"><a href="#"><h3>View all Projects</h3></a></li> </ul> </li> <li class=""> <ul class="row"> <li class="col-sm-12"><a href="#"><h4>Nevada, USA</h4></a></li> <li class="col-sm-4"><a href="#">Bay State Silver Project</a></li> <li class="col-sm-4"><a href="#">County Line Diatomite Project</a></li> <li class="col-sm-4"><a href="#">Garfield Silver-Gold-Copper Project</a></li> <li class="col-sm-4" style="clear:both;"><a href="#">Junction Gold Project</a></li> <li class="col-sm-4"><a href="#">Newark Gold Project</a></li> <li class="col-sm-4"><a href="#">Clayton Silver-Gold Project</a></li> <li class="col-sm-4" style="clear:both;"><a href="#">Stonewall Gold Project</a></li> <li class="col-sm-4"><a href="#">Ridge Limestone Project</a></li> <li class="col-sm-4 dropdown open"><a href="#"> Pozz Project <span class="glyphicon glyphicon-chevron-down"></span></a> <ul class=""> <li class=""> <ul class=""> <li class=""><a href="#">Overview</a></li> <li class=""><a href="#">CS Deposit</a></li> <li class=""><a href="#">Pozz Ash Deposit</a></li> </ul> </li> </ul> </li> </ul> </li> <hr/> <li class=""> <ul class="row"> <li class="col-sm-12"><a href="#"><h4>Australia</h4></a></li> <li class="col-sm-4"><a href="#">Cue Diamond Project</a></li> <li class="col-sm-4"><a href="#">Baker's Gold Project</a></li> </ul> </li> <hr/> <li class=""> <ul class="row"> <li class="col-sm-12"><a href="#"><h4>Ireland</h4></a></li> <li class="col-sm-4"><a href="#">Derryginagh Barite Project</a></li> </ul> </li> </ul> </li> <li> <a href="#">Contact</a> </li> </ul> </div><!-- /.nav-collapse --> </nav> </div>
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700); body { font-family: 'Open Sans', 'sans-serif'; background:#f0f0f0; } .navbar-nav>li>.dropdown-menu { border-top-left-radius:4px; border-top-right-radius:4px; } .navbar-default .navbar-nav>li>a { /*width:200px;*/ font-weight:bold; } .dropdown-menu { position: relative; } .mega-dropdown { position: static !important; /* width:100%; */ } .mega-dropdown-menu { position: absolute; margin-top:20px !important; padding: 20px 0px; width: 100%; box-shadow: none; -webkit-box-shadow: none; } .mega-dropdown-menu:before { content: ""; border-bottom: 15px solid #fff; border-right: 17px solid transparent; border-left: 17px solid transparent; position: absolute; top: -15px; left: 285px; z-index: 10; } .mega-dropdown-menu:after { content: ""; border-bottom: 17px solid #ccc; border-right: 19px solid transparent; border-left: 19px solid transparent; position: absolute; top: -17px; left: 283px; z-index: 8; } .mega-dropdown-menu > li > ul { padding: 0; margin: 0; } .mega-dropdown-menu > li > ul > li { list-style: none; } .mega-dropdown-menu > li > ul > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.428571429; color: #999; white-space: normal; } .mega-dropdown-menu > li ul > li > a:hover, .mega-dropdown-menu > li ul > li > a:focus { text-decoration: none; color: #444; background-color: #f5f5f5; } .mega-dropdown-menu .dropdown-header { color: #428bca; font-size: 18px; font-weight:bold; } .mega-dropdown-menu form { margin:3px 20px; } .mega-dropdown-menu .form-group { margin-bottom: 3px; }
$('li.dropdown.mega-dropdown a').on('click', function (event) { $(this).parent().toggleClass('open'); console.log('farts'); }); $('body').on('click', function (e) { if (!$('li.dropdown.mega-dropdown').is(e.target) && $('li.dropdown.mega-dropdown').has(e.target).length === 0 && $('.open').has(e.target).length === 0 ) { $('li.dropdown.mega-dropdown').removeClass('open'); } });
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76