Как сделать открытие меню ME901 по нажатию кнопки в Tilda
 

Как сделать открытие меню ME901 по нажатию кнопки в Tilda

1
Создали меню МЕ901 (в настройках включили - скрыть меню)
2
Создали кнопку со ссылкой #openmenu
3
Добавили код в блок Другое - Т123
Библиотека для примера
<script>
document.addEventListener("DOMContentLoaded", function() {
    (function () {
        
        const openButton = document.querySelectorAll('a[href="#openmenu"]');
            openButton.forEach(function (el, index) {
                el.addEventListener('click',function(e) {
                    
                    const width = window.innerWidth;
                    const menuPanel = document.querySelector('.t830__panel');
                    const menuContent = document.querySelector('.t830__menu__content');
                    
                    if ( width>=1500  && !menuPanel.classList.contains("t830__panel_open") ) {
                        return; 
                    }else{
                        menuContent.click();
                    };    
                });    
        });
 
    })();    
});    
</script>
Библиотека для примера (скрыть панель)
<style>
.t830{ --nullpoint:0}
.t830__panel { width: var(--nullpoint)}
.t830m {left: var(--nullpoint)}
div#allrecords {padding-left: var(--nullpoint)}
.t830__panel { height: var(--nullpoint)}
.t830__burger.t830__burger_mobile { display: none}
.t830__burger.t830__burger_open {left: 230px}
.t830__burger {
    left: -100px;
    transition: all ease-in-out  .3s;
}    
</style>
Made on
Tilda