r/javascript • u/[deleted] • Aug 21 '18
Effectively supported in all browsers, JavaScript has its own form of media queries just like CSS.
https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
465
Upvotes
r/javascript • u/[deleted] • Aug 21 '18
39
u/PortablePawnShop Aug 22 '18
Clumsily using
SetIntervalto trackwindow.innerwidthto notify JS of the corresponding CSS media query and sloppily try to fasten JS and CSS together, and more I probably shouldn't admit lol. Self-taught, program recreationally