Difference between revisions of "MediaWiki:Mobile.js"

no edit summary
Line 88: Line 88:


// ========================== Integrazione pagine Wix 2024 ==========================
// ========================== Integrazione pagine Wix 2024 ==========================
/* ============= Animazioni homepage ============= */


function handleEntries(entries) {
function handleEntries(entries) {
Line 116: Line 118:
for (var i = 0; i < hiddenElements.length; i++) {
for (var i = 0; i < hiddenElements.length; i++) {
     observer.observe(hiddenElements[i]);
     observer.observe(hiddenElements[i]);
}
/* ============= Template:Main menu ============= */
function openMenu() {
    console.log('Trigger clicked!');
    document.getElementById('masticationpedia-main-menu').style.display = 'block';
}
var openMenuButton = document.getElementById('main-menu-open');
if (openMenuButton) {
    openMenuButton.addEventListener('click', openMenu);
}
function closeMenu() {
    console.log('Trigger clicked!');
    document.getElementById('masticationpedia-main-menu').style.display = 'none';
}
var closeMenuButton = document.getElementById('main-menu-close');
if (closeMenuButton) {
    closeMenuButton.addEventListener('click', closeMenu);
}
}