https://i.sstatic.net/5rdYY.pngI am currently working on a fun website project . I am facing an issue with the mobile menu button not disappearing using display:none
in Safari on my iPhone when in landscape mode, even though it works fine in Chrome. My goal is to make the #menu-button visible when the device screen size is under 500px and hide it when it goes above 500px. The menu button is inserted via jQuery with the id of #menu-button
. Checking the css_tablet.css source in dev tools will show you that I have set #menu-button
to display:none
. Any advice on how to solve this would be greatly appreciated.
$("#menu").addClass("js").before('<div id="menu-button"><img src="third_logo.png" alt="menu"></div>');
$("#menu-button").click(function(){
$("#menu").toggle();
});
$("li").click(function(){
$("ul").hide();
});