Skip to content

Instantly share code, notes, and snippets.

@fyunli
Created February 27, 2012 08:31
Show Gist options
  • Save fyunli/1922583 to your computer and use it in GitHub Desktop.
Save fyunli/1922583 to your computer and use it in GitHub Desktop.
Bootstrap 2.0 dropdown multi-level menu enabler
/**
* Bootstrap 2.0 dropdown multi-level menu enabler
* Bootstrap: http://twitter.github.com/bootstrap/javascript.html#dropdowns
*
* Bootstrap 2.1 add submenu support, don't use this
*/
/* overrides */
.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color: #666;}
.open .dropdown-menu,.dropdown.open .dropdown-menu{display:none;}
.open > .dropdown-menu,.dropdown.open > .dropdown-menu{display:block;}
.open .dropdown-menu > .dropdown:hover > .dropdown-menu,
.dropdown.open .dropdown-menu > .dropdown:hover > .dropdown-menu{
display:block;
}
.dropdown-menu > .dropdown > .dropdown-menu {
top: 0px;
}
.dropdown-menu > .dropdown > .dropdown-toggle:hover {
color:#fff;
background-color: #0088cc;
}
.dropdown-menu > .dropdown > .dropdown-toggle {
background: none;
}
.dropdown-menu > .dropdown.offset-left > .dropdown-menu {
left: -100%;
}
.dropdown-menu > .dropdown.offset-right > .dropdown-menu {
left: 100%;
}
.dropdown-menu > .dropdown.offset-left > .dropdown-menu:before,
.dropdown-menu > .dropdown.offset-right > .dropdown-menu:before,
.dropdown-menu > .dropdown.offset-left > .dropdown-menu:after,
.dropdown-menu > .dropdown.offset-right > .dropdown-menu:after {
content: '';
display: inline-block;
border: 0;
position: absolute;
}
@thomen
Copy link

thomen commented Mar 8, 2012

Hi i was just wondering when does the open class get appended to your css? It doesn't seem to happen as a function of the drop down click?

@fyunli
Copy link
Author

fyunli commented Mar 8, 2012

@thomen: bootstrap handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment