回答編集履歴

1

途中で送信してしまいました。

2017/03/09 01:34

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36115

test CHANGED
@@ -1,3 +1,33 @@
1
+ ```javascript
2
+
3
+ $(document).ready(function() {
4
+
5
+ $("#my-menu").mmenu({
6
+
7
+ // Options
8
+
9
+ });
10
+
11
+ var API = $("#my-menu").data( "mmenu" );
12
+
13
+
14
+
15
+ $("#my-button").click(function() {
16
+
17
+ API.close();
18
+
19
+ });
20
+
21
+ });
22
+
23
+ ```
24
+
25
+ ```HTML
26
+
27
+ <a href="#my-page">Close the menu</a>
28
+
29
+ ```
30
+
1
31
  > By default, the menu only closes after clicking on the still visible part of the page. The plugin also automatically binds a click event that closes the menu to every A element that links to the page.
2
32
 
3
33
  [jQuery.mmenu basic tutorial, open and close a menu](http://mmenu.frebsite.nl/tutorials/off-canvas/open-and-close-the-menu.html)