Skip to content

Commit

Permalink
Fix bug where clicking link in ToC wouldn't hide ToC on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
lord committed Mar 2, 2017
1 parent 5d0bef6 commit 4aae61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/javascripts/app/_toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
};

var closeToc = function() {
$(".tocify-wrapper").removeClass('open');
$(".toc-wrapper").removeClass('open');
$("#nav-button").removeClass('open');
};

Expand Down Expand Up @@ -83,7 +83,7 @@
return false;
});
$(".page-wrapper").click(closeToc);
$(".tocify-item").click(closeToc);
$(".toc-link").click(closeToc);

// reload immediately after scrolling on toc click
$toc.find(tocLinkSelector).click(function() {
Expand Down

0 comments on commit 4aae61a

Please sign in to comment.