Harvey.js - A State Manager For CSS Media Queries
Join the DZone community and get the full member experience.
Join For Free
harvey.js
is a state manager for css media queries. media queries are great for
visual tweaks and simple behavioral switches, but they become difficult
to rely on when behaviors change for larger or smaller devices. harvey
helps you monitor and manage those changes by firing an event whenever
your media query is activated.
this method is preferable to relying on a screen resize event because
you only receive an event when the query is matched - not for every
screen resize. less testing and more doing.
requirements
: none
demo
:
http:/ / harvesthq. github. com/ harvey/ #demo
license
: free
Published at DZone with permission of Hirvesh Munogee, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments