hugo-code-editor-theme/static/js/theme.min.js

1 line
591 B
JavaScript
Raw Normal View History

2016-02-06 16:34:38 +00:00
!function(){function e(e){var t="open",n=document.getElementById(e.getAttribute("data-open")),a=function(e){for(var t=n.getElementsByTagName("ul"),a=0;a<t.length;a++)e(t[a])};if(n){var l=n.getElementsByTagName("ul")[0];l&&"none"===window.getComputedStyle(l).display&&n.classList.remove(t),e.addEventListener("click",function(){n.getElementsByTagName("ul")[0];n.classList.contains(t)?(n.classList.remove(t),a(function(e){e.style.display="none"})):(n.classList.add(t),a(function(e){e.style.display="block"}))})}}for(var t=document.querySelectorAll("[data-open]"),n=0;n<t.length;n++)e(t[n])}();