I have a website, and I'm working responsiveness on it. I have a mobile version, similar to a Web app, in a specific directory within the project. Currently when the screen resolution is less than 768px, it automatically redirects to the mobile site. So far so bad, when I reduce the browser window it does not redirect unless I refresh the page, because what redirects is a JQuery script that checks when the page loads what the resolution is.
The problem is that I need to check all the time so that I can redirect when the screen is smaller and already rendered. I thought of putting a media query for resolutions of at least 768 wide, but I did not find out how to redirect from the css itself, or call some script when this query is enabled.
I also accept as a solution some JQuery event triggered when the width is