Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Panel Toggle
- var panel = document.getElementById('panels-container');
- var paneltog = document.querySelector(".paneltogglefooter");
- var panelsvg = document.querySelector(".paneltogglefooter svg");
- var panelpath = document.querySelector(".paneltogglefooter svg path");
- paneltog.style.height = "34px";
- panelsvg.style.padding = "7px 1px 0 1px"
- panelsvg.setAttributeNS(null, "viewBox", "0 0 16 16");
- wrapper.appendChild(paneltog);
- if (panel.classList.contains('switcher')) {
- panelpath.style = "d: path('M16 0v12h-16v-12h16zm-10 10v-8h-4v8h4z')";
- }
- else {
- panelpath.style = "d: path('M16 0v12h-16v-12h16zm-2 10v-8h-4v8h4z')";
- paneltog.classList.add('visible');
- }
- paneltog.addEventListener('click', function() {
- if (paneltog.classList.contains('visible')) {
- panelpath.style = "d: path('M16 0v12h-16v-12h16zm-10 10v-8h-4v8h4z')";
- paneltog.classList.remove('visible');
- }
- else {
- panelpath.style = "d: path('M16 0v12h-16v-12h16zm-2 10v-8h-4v8h4z')";
- paneltog.classList.add('visible');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement