Hi, submenu not appear in mobile view. After update to Joomla4.
PHP Version 7.4.33
Joomla 4.4.10
Hi, submenu not appear in mobile view. After update to Joomla4.
PHP Version 7.4.33
Joomla 4.4.10
I add this js and css in your custom code section, Follow this guide to add custom code: https://www.joomshaper.com/documentation/helix-framework/custom-code-css-js-meta
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll(".menu-parent").forEach(function (parent) {
// Create a span element for the toggle
let toggle = document.createElement("span");
toggle.classList.add("submenu-toggle");
toggle.textContent = "+"; // Default to collapsed
// Insert toggle icon inside the menu parent
parent.querySelector("a").after(toggle);
// Toggle submenu on click
toggle.addEventListener("click", function () {
let submenu = parent.querySelector(".menu-child");
if (submenu) {
submenu.style.display = submenu.style.display === "block" ? "none" : "block";
toggle.textContent = submenu.style.display === "block" ? "−" : "+";
}
});
});
});
anfd this css:
.menu-parent {
position: relative;
}
.submenu-toggle {
position: absolute !important;
right: 10px;
cursor: pointer;
font-size: 18px !important;
font-weight: bold;
z-index: 12;
}
.menu-child {
display: none; /* Initially hidden */
}
.menu-child.show {
display: block;
}
.offcanvas-menu .offcanvas-inner .sp-module ul>li a, .offcanvas-menu .offcanvas-inner .sp-module ul>li span {
display: flex;
font-size: 1rem;
padding: 0.125rem 0;
position: unset;
}
.offcanvas-menu .offcanvas-inner .sp-module ul>li {
overflow: unset !important;
} Hello,
Thanks for reaching out to us. I apologize for the inconvenience. I have resolved your issue.
Please check and let me know if everything is working fine.
Thanks,
Thank you for your prompt assistance. Could you share the solution to this issue? There are still nearly 40 websites that need fixing, so I would like to correct them myself.
I can put css in physical file custom.css, how about js.. and where the location to put in.
Please, follow this guide: https://www.joomshaper.com/documentation/helix-framework/custom-code-css-js-meta
Thanks.