From: Marius Gavrilescu Date: Fri, 24 Apr 2015 07:46:47 +0000 (+0300) Subject: Use document.documentElement.clientWidth instead of window.innerWidth X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=4aff66acc3f3830f255711563a27726c225a22c1;p=gruntmaster-page.git Use document.documentElement.clientWidth instead of window.innerWidth --- diff --git a/js/10-modal.js b/js/10-modal.js index 9bf83ce..eea85d7 100644 --- a/js/10-modal.js +++ b/js/10-modal.js @@ -13,7 +13,7 @@ function hide_modal () { } $(function() { - if(window.innerWidth < 768) + if(document.documentElement.clientWidth) return; modal = $('.modal')[0]; backdrop = $('.backdrop')[0]; diff --git a/js/90-mobilenav.js b/js/90-mobilenav.js index fb575d9..c536669 100644 --- a/js/90-mobilenav.js +++ b/js/90-mobilenav.js @@ -1,5 +1,5 @@ $(function(){ - if(window.innerWidth >= 768) + if(document.documentElement.clientWidth >= 768) return; $('#title')[0].insertAdjacentHTML('beforebegin', '
Tap title to toggle menu
'); $('nav')[0].classList.add('hidden');