aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2016-12-13 09:27:15 +0100
committerGitHub <noreply@github.com>2016-12-13 09:27:15 +0100
commite00062ea8f7b756d814aa8d3f84898a07447daa2 (patch)
treebed7df5829ce8e300fbfec5e1abe149d0a96dc32
parent3c0358c9cf4e45310edfe528eb7f7936c54abf6d (diff)
parent812ac259e27b7fd7aaa6a38adee727449b4f6f4e (diff)
downloadvolse-hubzilla-e00062ea8f7b756d814aa8d3f84898a07447daa2.tar.gz
volse-hubzilla-e00062ea8f7b756d814aa8d3f84898a07447daa2.tar.bz2
volse-hubzilla-e00062ea8f7b756d814aa8d3f84898a07447daa2.zip
Merge pull request #619 from anaqreon/dev
Make region_1 table of contents "unsticky" when width is less than
-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});
+ }
+ });
});