Skip to content
Snippets Groups Projects
Commit e6889ecc authored by Andreas Gohr's avatar Andreas Gohr
Browse files

removed debugging and check for TOC/sidebar exisance

parent 688c5219
No related branches found
No related tags found
No related merge requests found
......@@ -4,17 +4,23 @@ function tpl_dokuwiki_mobile(){
var $handle = jQuery('#dokuwiki__aside h3.toggle');
var $toc = jQuery('#dw__toc h3');
if(document.body.clientWidth > 979) {
console.log('desktop');
// reset for desktop mode
$handle[0].setState(1);
$handle.hide();
$toc[0].setState(1);
if($handle.length) {
$handle[0].setState(1);
$handle.hide();
}
if($toc.length) {
$toc[0].setState(1);
}
} else {
console.log('mobile');
// toc and sidebar hiding
$handle.show();
$handle[0].setState(-1);
$toc[0].setState(-1);
if($handle.length) {
$handle.show();
$handle[0].setState(-1);
}
if($toc.length) {
$toc[0].setState(-1);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment