I just finished creating a responsive menu for a website.
Here's how it works: when viewing the site on a regular browser with a width less than 768px, the navigation menu items are stacked and hidden. To reveal them, the user needs to click on a toggle button. However, if the browser width is over 992px, the navigation menu items are displayed in a single line.
However, I encountered an issue with iPads. If a user opens the site on an iPad in portrait mode (width = 768px), clicks the toggle button to reveal the menu, then clicks it again to hide the menu, and subsequently rotates the iPad to landscape mode (width > 768px), the navigation menu disappears.
On the other hand, if the user opens the site on an iPad in portrait mode but does not interact with the toggle button before rotating to landscape mode, the navigation menu remains visible in the new orientation.
I suspect that my use of "fadeToggle" in jQuery might be causing this problem due to issues recognizing resolution changes after tablet rotation.
How can I address this issue effectively?