add toc button for mobile screen
parent
2bb57ea40f
commit
051840df3c
|
@ -39,11 +39,16 @@ $( document ).ready(function() {
|
||||||
// add sticky table headers
|
// add sticky table headers
|
||||||
$('table').stickyTableHeaders();
|
$('table').stickyTableHeaders();
|
||||||
|
|
||||||
|
|
||||||
|
// set the height of tableOfContents
|
||||||
var $postamble = $('#postamble');
|
var $postamble = $('#postamble');
|
||||||
var $tableOfContents = $('#table-of-contents');
|
var $tableOfContents = $('#table-of-contents');
|
||||||
// set the height of tableOfContents
|
|
||||||
$tableOfContents.height($tableOfContents.height() - $postamble.outerHeight());
|
$tableOfContents.height($tableOfContents.height() - $postamble.outerHeight());
|
||||||
|
|
||||||
|
// add TOC button
|
||||||
|
var toggleSidebar = $('<div id="toggle-sidebar"><a href="#table-of-contents"><h2>Table of Contents</h2></a></div>');
|
||||||
|
$('#content').prepend(toggleSidebar);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.SphinxRtdTheme = (function (jquery) {
|
window.SphinxRtdTheme = (function (jquery) {
|
||||||
|
|
Loading…
Reference in New Issue