diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-12-12 20:10:50 -0500 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-12-13 09:28:49 +0100 |
commit | 73a41b16bee19d8cf4aa52426e12bfb7256d2187 (patch) | |
tree | 2ed3b6249f04b81951dbe552f5bcc9ba76d0c58b /doc | |
parent | b8da386e55aad0ccc3ac7db3526e7ef75fee48a2 (diff) | |
download | volse-hubzilla-73a41b16bee19d8cf4aa52426e12bfb7256d2187.tar.gz volse-hubzilla-73a41b16bee19d8cf4aa52426e12bfb7256d2187.tar.bz2 volse-hubzilla-73a41b16bee19d8cf4aa52426e12bfb7256d2187.zip |
Make region_1 table of contents "unsticky" when width is less than 768px for better mobile support.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/toc.html | 11 |
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}); + } + }); }); |