Use window.innerWidth instead of document.body.clientWidth
[plack-app-gruntmaster.git] / js / 90-mobilenav.js
index d12e0fab2573a0018235a87c582dd309a353183c..f8774214d5109fbab11460017dd1ab799bf2368b 100644 (file)
@@ -2,11 +2,11 @@
        'use strict';
 
        $( document ).ready(function(){
-               if(document.body.clientWidth >= 768)
+               if(window.innerWidth >= 768)
                        return;
                $('#title').before('<div class="text-center">Tap title to toggle menu</div>');
                $('nav').addClass('hidden');
-               $('#title').css('margin', '6px').on('click', function () {
+               $('#title').on('click', function () {
                        $('nav').toggleClass('hidden');
                });
        });
This page took 0.009816 seconds and 4 git commands to generate.