diff options
author | git-marijus <mario@mariovavti.com> | 2016-12-13 09:27:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 09:27:15 +0100 |
commit | e00062ea8f7b756d814aa8d3f84898a07447daa2 (patch) | |
tree | bed7df5829ce8e300fbfec5e1abe149d0a96dc32 | |
parent | 3c0358c9cf4e45310edfe528eb7f7936c54abf6d (diff) | |
parent | 812ac259e27b7fd7aaa6a38adee727449b4f6f4e (diff) | |
download | volse-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.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}); + } + }); }); |