How to hide drawer upon user click

后端 未结 12 1772
北恋
北恋 2020-12-16 14:43

How do I hide the drawer when the user clicks on an item? Or when a button is clicked?

12条回答
  •  伪装坚强ぢ
    2020-12-16 14:49

    add this code to a custom button 'click' event (tested on version 1.3.0)

    $(".mdl-layout__drawer, .mdl-layout__obfuscator").toggleClass("is-visible");
    

提交回复
热议问题