-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to close the drawer? #3520
Comments
You are right, the drawer doesn’t close because usually the drawer contains links causing a full reload. We have added the With that you can |
@surma 1.1 will probably ship next week 🎉 Great news and thank you! |
Do I need something special to make this work I am using version 1.1.3, hosted via google (as described here: http://www.getmdl.io/started/): <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script> with a basic body structure <body class="mdl-demo mdl-color--grey-100 mdl-color-text--grey-700 mdl-base">
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
<header class="mdl-layout__header">
<!-- header -->
</header>
<div class="mdl-layout__drawer">
<!-- drawer -->
</div>
<main class="mdl-layout__content">
<!-- main content -->
</main>
</div>
</body> |
Unfortunately I think this method:
Where app was the id of my .mdl-layout container. |
Did you manage to solve this? |
I managed to get it to work by selecting the first element |
Simple JS only approach (for future visitors):
edit: Now with 100% less uncaught exceptions. |
Hi,
I have a question. I click on the menu button to open the drawer and click a menu item. The drawer does not close after clicking an item. Is there a way to configure the menu or trigger the drawer to close after a menu item has been clicked?
Thanks,
Kerry
The text was updated successfully, but these errors were encountered: