AmpersandJS / tools.ampersandjs.com

Hand-picked tools for building ampersand apps. A grab bag of "solved problems" for single page apps.
https://tools.ampersandjs.com
MIT License
11 stars 2 forks source link

Media Query breakpoint change listener #30

Closed svenheden closed 9 years ago

svenheden commented 9 years ago

Hey,

I have created a module for observing media query breakpoint changes defined in CSS. A common way to accomplish this is to use window.matchMedia(), but if we want to use the same Media Queries in our JavaScript as in our CSS we have to define them in both environments. Use this module if you want to avoid that.

https://www.npmjs.com/package/media-query-listener https://github.com/jonathanp/media-query-listener

Regards, Jonathan

HenrikJoreteg commented 9 years ago

added, thanks! sorry for the delay.