1.0.0 • Published 6 years ago

@legtech/jsmediaqueries v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Javascript module to responsively modify elements when css cannot be used. Also ties css media query breakpoints into js breakpoint so they are the same.

To use, put the following in your site.js:

$(document).ready(function (event, data) {
//initialize javascript media queries WSLApp.JSMediaQueries.init(); WSLApp.JSMediaQueries.apply();
});

The processMediaQuery function will be run on every resize after the specified throttle.

Any transormations that need to occure can be put inthe ResponsiveElements file as a new function and called from jsMediaQueries (to decouple the action from the breakpoint logic).