回答編集履歴
1
途中で送信してしまいました。
answer
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
```javascript
|
|
2
|
+
$(document).ready(function() {
|
|
3
|
+
$("#my-menu").mmenu({
|
|
4
|
+
// Options
|
|
5
|
+
});
|
|
6
|
+
var API = $("#my-menu").data( "mmenu" );
|
|
7
|
+
|
|
8
|
+
$("#my-button").click(function() {
|
|
9
|
+
API.close();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
```
|
|
13
|
+
```HTML
|
|
14
|
+
<a href="#my-page">Close the menu</a>
|
|
15
|
+
```
|
|
1
16
|
> 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
17
|
[jQuery.mmenu basic tutorial, open and close a menu](http://mmenu.frebsite.nl/tutorials/off-canvas/open-and-close-the-menu.html)
|
|
3
18
|
|