]> iEval git - plack-app-gruntmaster.git/blobdiff - js/90-mobilenav.js
Collapse nav on mobile devices
[plack-app-gruntmaster.git] / js / 90-mobilenav.js
diff --git a/js/90-mobilenav.js b/js/90-mobilenav.js
new file mode 100644 (file)
index 0000000..d12e0fa
--- /dev/null
@@ -0,0 +1,13 @@
+(function(){
+       'use strict';
+
+       $( document ).ready(function(){
+               if(document.body.clientWidth >= 768)
+                       return;
+               $('#title').before('<div class="text-center">Tap title to toggle menu</div>');
+               $('nav').addClass('hidden');
+               $('#title').css('margin', '6px').on('click', function () {
+                       $('nav').toggleClass('hidden');
+               });
+       });
+})();
This page took 0.023566 seconds and 4 git commands to generate.