Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 7440ed1

Browse files
committed
No closing nav anim on devices < 800px
1 parent c67a083 commit 7440ed1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

js/site.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,13 @@ $(document).ready(enableHamburger);
127127

128128
$(document).ready(function hideSummaryOnMobile() {
129129
if (window.matchMedia("(max-width: 800px)").matches) {
130-
$('div.book').toggleClass("without-summary");
131-
$('div.book').toggleClass("with-summary");
130+
$('div.book')
131+
.addClass("without-animation")
132+
.removeClass("with-summary")
133+
.addClass("without-summary")
134+
.offset();
135+
$('div.book')
136+
.removeClass("without-animation");
132137
}
133138
})
134139

styles/gitbook/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,10 +2764,12 @@ table {
27642764
overflow-y:auto;
27652765
color:#000;
27662766
background:#fff;
2767+
/*
27672768
-webkit-transition:left 250ms ease;
27682769
-moz-transition:left 250ms ease;
27692770
-o-transition:left 250ms ease;
27702771
transition:left 250ms ease
2772+
*/
27712773
}
27722774
.book-body .body-inner {
27732775
position:absolute;
@@ -2779,10 +2781,12 @@ table {
27792781
}
27802782
@media (max-width:1240px) {
27812783
.book-body {
2784+
/*
27822785
-webkit-transition:-webkit-transform 250ms ease;
27832786
-moz-transition:-moz-transform 250ms ease;
27842787
-o-transition:-o-transform 250ms ease;
27852788
transition:transform 250ms ease;
2789+
*/
27862790
padding-bottom:20px
27872791
}
27882792
.book-body .body-inner {

0 commit comments

Comments
 (0)