0
I am creating a responsive dropdown menu using the same html structure (without creating a structure larger than 1024 and another smaller than 1024), when clicking the icone of the dropdown menu ul li appear, however if I leave the menu open smaller than 1024 and increase the screen, the menu disappears(because of jquery that uses None display to hide), I did the following routine in jquery:
window.onresize = function () {
if ($(window).width() > 1008) {
$(".nav ul").css("display", "block");
$(".nav").removeClass("menu_responsive");
$(".ico_menu_dropdown").removeClass("ico_menu_aberto");
}
else {
$(".nav ul").css("display", "none");
}
}
however when I enter the phone and give a scrol down (with the menu open) the menu hides. From what I understand jquery is understanding onresize as scroll. Someone has had the same problem?
I have tried this and not for sure, because of the display block of . Hide();
– Lourençon O.
Can you put your code in jsfilldle? So I can better understand the problem and maybe answer by yourself, thank you!
– concas