diff --git a/dist/toc.css b/dist/toc.css index c9c31dc..a95f677 100644 --- a/dist/toc.css +++ b/dist/toc.css @@ -25,6 +25,10 @@ aside.nav.nothing { padding-left: 5px; } +.page_toc a > * { + pointer-events: none; +} + .page_toc code { background-color: #f8f8f8; border-radius: 2px; diff --git a/dist/toc.js b/dist/toc.js index 70a76d9..23a4220 100644 --- a/dist/toc.js +++ b/dist/toc.js @@ -39,7 +39,7 @@ var tocClick = function(e) { }); // Make sure this is attached to the parent not itself - e.target.parentNode.setAttribute('class', 'active') + e.currentTarget.setAttribute('class', 'active') }; var createList = function(wrapper, count) {