mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
📚 Merge penpot/penpot-docs repository
This commit is contained in:
committed by
Andrey Antukh
parent
3932054ea6
commit
88296480ec
16
docs/js/toc.js
Normal file
16
docs/js/toc.js
Normal file
@@ -0,0 +1,16 @@
|
||||
(function (window, document) {
|
||||
"use strict";
|
||||
|
||||
let titleEl;
|
||||
let tocEl;
|
||||
|
||||
const titleClicked = (e) => {
|
||||
tocEl.classList.toggle('open');
|
||||
};
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
titleEl = document.getElementById("toc-title");
|
||||
tocEl = document.getElementById("toc");
|
||||
titleEl.addEventListener("click", titleClicked);
|
||||
});
|
||||
})(window, document);
|
||||
Reference in New Issue
Block a user