aboutsummaryrefslogtreecommitdiffstats
path: root/doc/toc.html
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-12-12 20:10:50 -0500
committerAndrew Manning <tamanning@zoho.com>2016-12-12 20:10:50 -0500
commit812ac259e27b7fd7aaa6a38adee727449b4f6f4e (patch)
treebed7df5829ce8e300fbfec5e1abe149d0a96dc32 /doc/toc.html
parent3c0358c9cf4e45310edfe528eb7f7936c54abf6d (diff)
downloadvolse-hubzilla-812ac259e27b7fd7aaa6a38adee727449b4f6f4e.tar.gz
volse-hubzilla-812ac259e27b7fd7aaa6a38adee727449b4f6f4e.tar.bz2
volse-hubzilla-812ac259e27b7fd7aaa6a38adee727449b4f6f4e.zip
Make region_1 table of contents "unsticky" when width is less than 768px for better mobile support.
Diffstat (limited to 'doc/toc.html')
-rw-r--r--doc/toc.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/toc.html b/doc/toc.html
index 8f0261dc7..0d342d25a 100644
--- a/doc/toc.html
+++ b/doc/toc.html
@@ -407,11 +407,20 @@
tocUl.removeClass(); // Classes are automatically added to <ul> elements by something else
tocUl.toc({content: "#doco-content", headings: "h1"});
tocUl.addClass('toc-content sub-menu');
- if( $(window).height() > 499) {
+ tocUl.attr('id', 'doco-side-toc');
+ if( $(window).width() > 768) {
tocUl.sticky({topSpacing:$('nav').outerHeight(true), zIndex: 1000});
}
}
});
+
+ $( window ).resize(function() {
+ if($(window).width() < 768 ) {
+ $( "#doco-side-toc" ).unstick();
+ } else {
+ $( "#doco-side-toc" ).sticky({topSpacing:$('nav').outerHeight(true), zIndex: 1000});
+ }
+ });
});