Enhance mobile button to show/hide menu

Related with: https://gwt-review.googlesource.com/#/c/7400

Change-Id: Ie622a6b9ef1d36a5fd372b66e1314b950f29eec1
diff --git a/src/main/java/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java b/src/main/java/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java
index fff78ff..06986cb 100644
--- a/src/main/java/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java
+++ b/src/main/java/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java
@@ -113,6 +113,14 @@
       }
     });
 
+    // In mobile have a link for opening/closing the menu
+    $("#nav-mobile").on("click", new Function() {
+      @Override
+      public void f() {
+        $("#gwt-toc").toggleClass("show");
+      }
+    });
+
     // Do not continue enhancing if Ajax is disabled
     if (!ajaxEnabled) {
       // Select current item from the URL info
@@ -128,6 +136,9 @@
             // Is it a normal click (not ctrl/cmd/shift/right/middle click) ?
             clickHelper.handleAsClick(e)) {
 
+          // In mobile, if menu is visible, close it
+          $("#gwt-toc.show").removeClass("show");
+
           // Load the page using Ajax
           loadPage($(e));
           return false;