summaryrefslogtreecommitdiff
path: root/lib/tpl/dokuwiki/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tpl/dokuwiki/script.js')
-rw-r--r--lib/tpl/dokuwiki/script.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js
new file mode 100644
index 000000000..75575608b
--- /dev/null
+++ b/lib/tpl/dokuwiki/script.js
@@ -0,0 +1,14 @@
+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);