I have a set of links inside of a drawer. Just like the navigation example here:
http://www.getmdl.io/components/index.html#layout-section/layout
The only difference is that my links don't cause a page to refresh (it's a single page app built with backbone). How do I close the drawer after clicking a link?
Looks like there is a .is-visible class on the drawer, and by removing it, the drawer hides. So (using jquery) something like this toggles the drawer:
$(".mdl-layout__drawer").toggleClass("is-visible")
So I need to add that to an event handler for the links, or put it in an onClick attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With