Answer the question
In order to leave comments, you need to log in
How to solve the problem with matchMedia on Android devices?
Got the code from the previous programmer
function setupForWidth(mql) {
if(mql.matches) {
menu.classList.remove('hidden');
document.querySelector('body').classList.remove('mod-position-f')
} else {
menu.classList.add('hidden');
bodyPosition(menu, 'hidden');
}
}
var mql = window.matchMedia("screen and (min-width: 768px)");
if(menu) {
mql.addListener(setupForWidth);
setupForWidth(mql)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question