Yuri Boyz
asked on
Refresh page on browser resize
I am testing my website. To test the responsive menu I resize the browser and on certain size the mega menu hides and hamburger menu appears. In hamburger menu there is a search keyword textbox and submit button. But it will not work unless I refresh the page.
But if I directly open the website on mobile and tablet then it will work perfectly.
I have added several codes so that if user resize the browser then page reload code will run but thus not works also everytime.
Any solution for this?
But if I directly open the website on mobile and tablet then it will work perfectly.
I have added several codes so that if user resize the browser then page reload code will run but thus not works also everytime.
Any solution for this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The browser does not notify the web page that the window has been resized. You would have to be continuously checking the window size to know that.
@Dave Baldwin: there's an event for that. https://developer.mozilla.org/en-US/docs/Web/Events/resize
You should rethink or fix your template instead.