bjork24 / Unison

Unifying named breakpoints across CSS, JS, and HTML
http://bjork24.github.io/Unison
MIT License
453 stars 41 forks source link

Listen from js for breakpoint change event #5

Closed jimhigson closed 10 years ago

jimhigson commented 10 years ago

I think it'd be very useful if unison.js provided a way for listening when the breakpoint changes.

Something like:

Unison.getBreakpoints().onChange(function(newBreakpoint){
});
bjork24 commented 10 years ago

This is currently outside of the scope of unison.js, which is intended only to share named breakpoints across front-end layers. A simple plugin could be written to provide this functionality, however.