Skip to content

Instantly share code, notes, and snippets.

@bbmatt
Last active December 27, 2015 09:09
Show Gist options
  • Save bbmatt/7302261 to your computer and use it in GitHub Desktop.
Save bbmatt/7302261 to your computer and use it in GitHub Desktop.
Bootstrap 3.0 - no javascript. This solves a number of accessibility issues that may arise with Javascript disabled - it may cause a few issues too :)
//
// no-js
// --------------------------------------------------
// Modernizer.js provides us a class to use if Javascript is disabled.
// (https://github.com/Modernizr/Modernizr/blob/master/src/setClasses.js#L9)
// Bootstrap .collapse - no javascript?, display it as block. Anything using .collapse 'expanded' by default.
.no-js .collapse {
display: block;
}
// Bootstrap .dropdown - no javascript?, provide hover alternative
.no-js .dropdown:hover .dropdown-menu {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment