diff options
-rw-r--r-- | lib/tpl/dokuwiki/script.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index b31d3dc08..75575608b 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -1,10 +1,14 @@ -jQuery(function(){ - // check if we are in mobile mode - if(jQuery('div.mobileTools').css('display') == 'none') return; +function tpl_dokuwiki_mobile(){ + // check if we are in mobile or tablet mode be sure to adjust the number + // here when adjusting it in the css + if(document.body.clientWidth > 979) return; // toc and sidebar hiding dw_page.makeToggle('#dokuwiki__aside h3.toggle','#dokuwiki__aside div.content'); jQuery('#dw__toc h3.toggle').click(); jQuery('#dokuwiki__aside h3.toggle').show().click(); -}); +} + +jQuery(tpl_dokuwiki_mobile); +jQuery(window).bind('resize',tpl_dokuwiki_mobile); |