From e8f98d96113e5f6c25d38cf314bdd7509c467b3c Mon Sep 17 00:00:00 2001 From: itqop Date: Sun, 17 Mar 2024 23:49:40 +0300 Subject: [PATCH] add navbar fix --- home/static/js/scripts.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/static/js/scripts.js b/home/static/js/scripts.js index 2cfe139..aabbbda 100644 --- a/home/static/js/scripts.js +++ b/home/static/js/scripts.js @@ -32,4 +32,13 @@ window.onload = function () { document.getElementById("accept-cookies-btn").addEventListener("click", function () { setCookie("cookies_accepted", true, 365); // Устанавливаем куки на год document.getElementById("icms-cookiealert").style.display = "none"; // Скрываем cookie alert +}); + +document.addEventListener("DOMContentLoaded", function() { + var navbarToggler = document.querySelector('.navbar-toggler'); + var targetMain = document.querySelector('#target-main'); + + navbarToggler.addEventListener('click', function() { + targetMain.classList.toggle('show'); + }); }); \ No newline at end of file