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
"School Year Selectors"
Bootstrap 3.3.0 Snippet by
cdenby
3.3.0
select
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
5.2K
 
2 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="col-sm-4"> <div class="row"> <h2>Test of a nested school year filter</h2> <div class="dropdown"> <a id="ddYearChoice" role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#" href="#"> Available Schools - 20152016<i class="caret"></i> </a> <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu"> <li class="dropdown-submenu"> <a href="#" tabindex="-1" class="year"> 20162017 </a> <ul class="dropdown-menu yearschools" data-year="20162017"> <li><a href="#" onClick="SY(this);">Atikokan High School</a></li> <li><a href="#" onClick="SY(this);">Fort Frances High School</a></li> <li><a href="#" onClick="SY(this);">Rainy River High School</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Atikokan High School Elementary</a></li> <li><a href="#" onClick="SY(this);">Crossroads</a></li> <li><a href="#" onClick="SY(this);">Donald Young</a></li> <li><a href="#" onClick="SY(this);">J.W. Walker</a></li> <li><a href="#" onClick="SY(this);">Mine Centre</a></li> <li><a href="#" onClick="SY(this);">McCrosson-Tovell</a></li> <li><a href="#" onClick="SY(this);">Nestor Falls</a></li> <li><a href="#" onClick="SY(this);">North Star</a></li> <li><a href="#" onClick="SY(this);">Robert Moore</a></li> <li><a href="#" onClick="SY(this);">Riverview</a></li> <li><a href="#" onClick="SY(this);">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Rainy River Night School</a></li> <li><a href="#" onClick="SY(this);">Rainy River Summer School</a></li> </ul> </li> <li class="dropdown-submenu"> <a href="#" tabindex="-1"> 20152016 </a> <ul class="dropdown-menu yearschools" data-year="20152016"> <li><a href="#" onClick="SY(this);">Atikokan High School</a></li> <li><a href="#" onClick="SY(this);">Fort Frances High School</a></li> <li><a href="#" onClick="SY(this);">Rainy River High School</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Atikokan High School Elementary</a></li> <li><a href="#" onClick="SY(this);">Crossroads</a></li> <li><a href="#" onClick="SY(this);">Donald Young</a></li> <li><a href="#" onClick="SY(this);">J.W. Walker</a></li> <li><a href="#" onClick="SY(this);">Mine Centre</a></li> <li><a href="#" onClick="SY(this);">McCrosson-Tovell</a></li> <li><a href="#" onClick="SY(this);">Nestor Falls</a></li> <li><a href="#" onClick="SY(this);">North Star</a></li> <li><a href="#" onClick="SY(this);">Robert Moore</a></li> <li><a href="#" onClick="SY(this);">Riverview</a></li> <li><a href="#" onClick="SY(this);">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Rainy River Night School</a></li> <li><a href="#" onClick="SY(this);">Rainy River Summer School</a></li> </ul> </li> <li class="dropdown-submenu"> <a href="#" tabindex="-1"> 20142015 </a> <ul class="dropdown-menu"> <li><a href="#">Atikokan High School</a></li> <li><a href="#">Fort Frances High School</a></li> <li><a href="#">Rainy River High School</a></li> <li class="divider"></li> <li><a href="#">Atikokan High School Elementary</a></li> <li><a href="#">Crossroads</a></li> <li><a href="#">Donald Young</a></li> <li><a href="#">J.W. Walker</a></li> <li><a href="#">Mine Centre</a></li> <li><a href="#">McCrosson-Tovell</a></li> <li><a href="#">Nestor Falls</a></li> <li><a href="#">North Star</a></li> <li><a href="#">Robert Moore</a></li> <li><a href="#">Riverview</a></li> <li><a href="#">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#">Rainy River Night School</a></li> <li><a href="#">Rainy River Summer School</a></li> </ul> </li> <li class="dropdown-submenu"> <a href="#" tabindex="-1"> 20132014 </a> <ul class="dropdown-menu"> <li><a href="#">Atikokan High School</a></li> <li><a href="#">Fort Frances High School</a></li> <li><a href="#">Rainy River High School</a></li> <li class="divider"></li> <li><a href="#">Atikokan High School Elementary</a></li> <li><a href="#">Crossroads</a></li> <li><a href="#">Donald Young</a></li> <li><a href="#">J.W. Walker</a></li> <li><a href="#">Mine Centre</a></li> <li><a href="#">McCrosson-Tovell</a></li> <li><a href="#">Nestor Falls</a></li> <li><a href="#">North Star</a></li> <li><a href="#">Robert Moore</a></li> <li><a href="#">Riverview</a></li> <li><a href="#">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#">Rainy River Night School</a></li> <li><a href="#">Rainy River Summer School</a></li> </ul> </li> <li class="dropdown-submenu"> <a href="#" tabindex="-1"> 20122013 </a> <ul class="dropdown-menu"> <li><a href="#" onClick="SY(this);">Atikokan High School</a></li> <li><a href="#" onClick="SY(this);">Fort Frances High School</a></li> <li><a href="#" onClick="SY(this);">Rainy River High School</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Atikokan High School Elementary</a></li> <li><a href="#" onClick="SY(this);">Crossroads</a></li> <li><a href="#" onClick="SY(this);">Donald Young</a></li> <li><a href="#" onClick="SY(this);">J.W. Walker</a></li> <li><a href="#" onClick="SY(this);">Mine Centre</a></li> <li><a href="#" onClick="SY(this);">McCrosson-Tovell</a></li> <li><a href="#" onClick="SY(this);">Nestor Falls</a></li> <li><a href="#" onClick="SY(this);">North Star</a></li> <li><a href="#" onClick="SY(this);">Robert Moore</a></li> <li><a href="#" onClick="SY(this);">Riverview</a></li> <li><a href="#" onClick="SY(this);">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#" onClick="SY(this);">Rainy River Night School</a></li> <li><a href="#" onClick="SY(this);">Rainy River Summer School</a></li> </ul> </li> </ul> </div> </div> </div> </div> <div class="col-sm-4"> <hr /><h2>Another possibility</h2> <div class="dropdown"> <a id="ddYearChoice2" role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#" href="#"> Available Schools - 20152016<i class="caret"></i> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">Atikokan High - 20162017</a></li> <li><a href="#" onClick="SY2(this);">Fort Frances High - 20162017</a></li> <li><a href="#" onClick="SY2(this);">Rainy River - 20162017</a></li> <li class="divider"></li> <li><a href="#" onClick="SY2(this);">Crossroads Public - 20162017</a></li> <li><a href="#" onClick="SY2(this);">Donald Young - 20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> <li><a href="#" onClick="SY2(this);">--All--20162017</a></li> </ul> </div> </div> <div class="col-sm-4"> <hr /><h2>Another possibility</h2> <div class="dropdown"> <a id="ddYearChoice3" role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#" href="#"> 20152016<i class="caret"></i> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> <li><a href="#">20162017</a></li> <li><a href="#">20152016</a></li> <li><a href="#">20142015</a></li> <li><a href="#">20132014</a></li> <li><a href="#">20122013</a></li> <li><a href="#">20112012</a></li> <li><a href="#">20102011</a></li> </ul> </div> <div class="dropdown"> <a id="ddSchoolChoice3" role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#" href="#"> Available Schools<i class="caret"></i> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> <li><a href="#">Atikokan High</a></li> <li><a href="#">Fort Frances High</a></li> <li><a href="#">Rainy River High</a></li> <li class="divider"></li> <li><a href="#">Crossroads</a></li> <li><a href="#">Donald Young</a></li> <li><a href="#">Fort Frances High Elementary</a></li> <li><a href="#">J.W. Walker</a></li> <li><a href="#">Mine Centre</a></li> <li><a href="#">McCrosson-Tovell</a></li> <li><a href="#">Nestor Falls</a></li> <li><a href="#">Northstart</a></li> <li><a href="#">Robert Moore</a></li> <li><a href="#">Riverview</a></li> <li><a href="#">Sturgeon Creek</a></li> <li class="divider"></li> <li><a href="#">RR Night</a></li> <li><a href="#">RR Summer</a></li> </ul> </div> </div>
body {font-size: 8px!important;} .dropdown-submenu { position: relative; } .dropdown-menu, .dropdown-submenu, .dropdown>a {font-size: 10px;} .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; border-radius: 0 6px 6px 6px; } .dropdown-submenu:hover>.dropdown-menu { display: block; } .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: #ccc; margin-top: 5px; margin-right: -10px; } .dropdown-submenu:hover>a:after { border-left-color: #fff; } .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; } .dropdown>li:hover > ul.dropdown-menu { display: block; }
function SY(a){ $("#ddYearChoice").html($(a).text() + "-" + $(a).closest(".yearschools").attr("data-year") + "<i class='caret'></i>"); } function SY2(a){}
Related:
See More
Template
Now UI Kit PRO
36.8K
35
School Form
130.4K
128
Stylish Sliders/Range Selectors!
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76