Answer the question
In order to leave comments, you need to log in
How to update an element when moving from mobile to desktop?
How to update a div when moving from mobile screen width to desktop. By "refresh" I mean what happens after clicking the refresh button in the browser. Is there a way to do this with media queries?
Answer the question
In order to leave comments, you need to log in
The simplest thing is to hang the handler on the onresize of the window
And there already "update" or bring the necessary elements to the desired state
A more detailed example https://habr.com/en/post/166321/
window.addEventListener("resize", myFunction);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question