Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
function t_menuBase_updateMobileMenuTop(rec) {
514 const mobileFixedMenu = rec.querySelector('.tmenu-mobile.tmenu-mobile_positionfixed');515 const mobileMenu = rec.querySelector('.tmenu-mobile__menucontent_fixed');516 if (!mobileFixedMenu || !mobileMenu) return;518 if (window.innerWidth <= 960) {519 const computedStyle = window.getComputedStyle(mobileFixedMenu);520 const baseMobileMenuHeight = 64;521 const height = parseFloat(computedStyle.height) || baseMobileMenuHeight;522 const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 0;523 const top = height + borderBottom;525 mobileMenu.style.setProperty('top', top + 'px', 'important');527 mobileMenu.style.setProperty('top', '0px');532 function t_menuBase__checkOverflow(recid, selector) {533 var rec = document.getElementById('rec' + recid);534 var menu = rec ? rec.querySelector(selector) : null;536 var oldMobileMenuSelector = rec.querySelector(selector + '__mobile');537 var burger = oldMobileMenuSelector ? oldMobileMenuSelector : rec.querySelector('.tmenu-mobile');539 var burgerHeight = burger.offsetHeight;541 var windowHeight = document.documentElement.clientHeight;542 var menuPosition = menu.style.position || window.getComputedStyle(menu).position;543 var menuHeight = menu.offsetHeight;545 if (menuPosition === 'fixed' && menuHeight > windowHeight - burgerHeight) {546 var availableHeight = windowHeight - burgerHeight * 2;547 menu.style.overflow = 'auto';548 menu.style.maxHeight = availableHeight + 'px';552 function t_menuBase__FadeOut(element, duration, callback) {553 if (!element) return false;555 duration = parseInt(duration, 10);556 var speed = duration > 0 ? duration / 10 : 40;557 var timer = setInterval(function () {558 element.style.opacity = opacity;560 if (opacity <= 0.1) {561 element.style.opacity = '0';562 element.style.display = 'none';563 if (typeof callback === 'function') {566 clearInterval(timer);571 function t_menuBase__fadeIn(element, duration, callback) {572 if (!element) return false;574 (getComputedStyle(element).opacity === '1' || getComputedStyle(element).opacity === '') &&575 getComputedStyle(element).display !== 'none'579 duration = parseInt(duration, 10);580 var speed = duration > 0 ? duration / 10 : 40;581 element.style.opacity = opacity;582 element.style.display = 'block';583 var timer = setInterval(function () {584 element.style.opacity = opacity;587 element.style.opacity = '1';588 if (typeof callback === 'function') {591 clearInterval(timer);596 function t_menuBase__slideElement(menu, menuHeight, direction) {597 var diff = direction === 'toTop' ? 0 : menuHeight;598 var diffOpacity = direction === 'toTop' ? 1 : 0;599 var timerID = setInterval(function () {600 menu.style.transform = 'translateY(-' + diff + 'px)';