Javascript onMediaQuery - A Neat Way To Trigger JavaScript When Media Queries Change
Join the DZone community and get the full member experience.
Join For Free
javascript onmediaquery
is a neat way to trigger js when media queries change. jeremy keith
recently posted a fantastic way of getting css and javascript to talk
media queries with the css :after pseudo-property. this has a number of
advantages over using window.matchmedia(), namely that you only have to
maintain your breakpoints in one place, and it fails more gracefully.
requirements : none
demo : https:/ / github. com/ joshbarr/ js-media-queries
license : mit license

requirements : none
demo : https:/ / github. com/ joshbarr/ js-media-queries
license : mit license
Media queries
JavaScript
Database
Media (communication)
Published at DZone with permission of Hirvesh Munogee, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments