Fix broken TOC toggle

This commit is contained in:
Michael Rose 2014-10-03 15:14:20 -04:00
parent 80f6c002f5
commit d0313bd423
3 changed files with 11 additions and 3 deletions

View file

@ -267,6 +267,7 @@ $button-size: 1.5rem;
.image-wrap { .image-wrap {
position: relative; position: relative;
margin-bottom: 2em; margin-bottom: 2em;
@include clearfix;
&:after { &:after {
content: " "; content: " ";
display: block; display: block;
@ -460,7 +461,7 @@ $button-size: 1.5rem;
padding: 10px; padding: 10px;
display: block; display: block;
color: $white; color: $white;
border-bottom-width: 0; text-decoration: none;
background: lighten($black, 30); background: lighten($black, 30);
@include opacity(0.7); @include opacity(0.7);
@include transition(opacity 0.2s ease-in-out); @include transition(opacity 0.2s ease-in-out);
@ -473,6 +474,13 @@ $button-size: 1.5rem;
} }
} }
} }
#drawer {
height: 100%;
overflow: hidden;
&.js-hidden {
max-height: 0;
}
}
.image-grid { .image-grid {
@include clearfix; @include clearfix;
list-style: none; list-style: none;

View file

@ -39,7 +39,7 @@ $(function() {
// Table of Contents toggle // Table of Contents toggle
$(function() { $(function() {
$(".toc h3").click(function () { $(".toc h3").click(function () {
$("#drawer").toggleClass("hidden"); $("#drawer").toggleClass("js-hidden");
}); });
}); });

File diff suppressed because one or more lines are too long