@evgeny.skarlat/js-mediaquery
v1.0.2
Published
Helps to match and run custom scripts during the different resolution
Downloads
1
Maintainers
Readme
Browser Support
| | | | | | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installing
Using npm:
$ npm i @evgeny.skarlat/js-mediaquery
Example
respond({
breakpoint: "320px",
run: () => {
document.getElementById('output').innerText = "matched"
},
back: () => {
document.getElementById('output').innerText = "no matched"
}
});