Skip to content
Snippets Groups Projects
Commit a8fd5d30 authored by alexisben's avatar alexisben
Browse files

fix toc error

parent 126100e9
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ const CLASSES = {
class TableOfContent {
constructor() {
this.element = document.querySelector('.toc-container');
if (!this.element) return;
this.content = this.element.querySelector('.toc-content');
this.nav = this.element.querySelector('.toc');
this.links = this.element.querySelectorAll('a');
......
......@@ -6,7 +6,6 @@ const actionKeys = [
const a11yClick = function(element, action) {
element.addEventListener('click', action);
element.addEventListener('keydown', (event) => {
console.log(event)
actionKeys.forEach(key => {
if (key === event.code) {
action(event);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment