I am using @media queries in css for responsive design. I only need one breakpoint.
How do I use javascript to detect which state the page is in at any given moment (ideally even when resizing a window)?
Based on the state (eg. below 640px width or over), I would like to run a different js function.
Thank you