prefix sidebar too
This commit is contained in:
parent
f562878131
commit
9b64db908f
|
@ -336,17 +336,17 @@ function sidebarToggle() {
|
|||
var html = $("html");
|
||||
if ( html.hasClass("sidebar-hidden") ) {
|
||||
html.removeClass("sidebar-hidden").addClass("sidebar-visible");
|
||||
store.set('sidebar', 'visible');
|
||||
store.set('mdbook-sidebar', 'visible');
|
||||
} else if ( html.hasClass("sidebar-visible") ) {
|
||||
html.removeClass("sidebar-visible").addClass("sidebar-hidden");
|
||||
store.set('sidebar', 'hidden');
|
||||
store.set('mdbook-sidebar', 'hidden');
|
||||
} else {
|
||||
if($("#sidebar").position().left === 0){
|
||||
html.addClass("sidebar-hidden");
|
||||
store.set('sidebar', 'hidden');
|
||||
store.set('mdbook-sidebar', 'hidden');
|
||||
} else {
|
||||
html.addClass("sidebar-visible");
|
||||
store.set('sidebar', 'visible');
|
||||
store.set('mdbook-sidebar', 'visible');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<!-- Hide / unhide sidebar before it is displayed -->
|
||||
<script type="text/javascript">
|
||||
var sidebar = store.get('sidebar');
|
||||
var sidebar = store.get('mdbook-sidebar');
|
||||
if (sidebar === "hidden") { $("html").addClass("sidebar-hidden") }
|
||||
else if (sidebar === "visible") { $("html").addClass("sidebar-visible") }
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue